Skip to content

Commit

Permalink
Bump version to 2005
Browse files Browse the repository at this point in the history
  • Loading branch information
canyie committed May 15, 2021
1 parent 99fb1c6 commit e09e847
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 9 deletions.
15 changes: 11 additions & 4 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,17 @@ android {
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
externalNativeBuild {
cmake {
cFlags "-Wall -Wextra -Werror -fvisibility=hidden"
cppFlags "-std=c++17"
arguments "-DRIRU_NEW_MODULE_API_VERSION=$rootProject.ext.riruNewApiVersion",
"-DRIRU_MODULE_VERSION_NAME=$rootProject.ext.versionName"
def flags = "-ffixed-x18" +
" -fvisibility=hidden" +
" -fvisibility-inlines-hidden" +
" -fno-rtti" + " -fno-exceptions" +
" -Wno-builtin-macro-redefined" +
" -D__FILE__=__FILE_NAME__"
cFlags "-Wall -Wextra $flags"
cppFlags "-std=c++17 $flags"
arguments "-DRIRU_MODULE_VERSION_NAME=$rootProject.ext.versionName",
"-DRIRU_NEW_MODULE_API_VERSION=$rootProject.ext.riruNewApiVersion",
"-DDREAMLAND_VERSION_CODE=$rootProject.ext.versionCode"
}
}
ndk {
Expand Down
1 change: 1 addition & 0 deletions app/src/main/cpp/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ cmake_minimum_required(VERSION 3.4.1)

add_definitions(-DRIRU_NEW_MODULE_API_VERSION=${RIRU_NEW_MODULE_API_VERSION})
add_definitions(-DRIRU_MODULE_VERSION_NAME="${RIRU_MODULE_VERSION_NAME}")
add_definitions(-DDREAMLAND_VERSION_CODE=${DREAMLAND_VERSION_CODE})

add_library(riru_dreamland
SHARED
Expand Down
5 changes: 2 additions & 3 deletions app/src/main/cpp/dreamland/dreamland.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,8 @@
namespace dreamland {
class Dreamland {
public:
// TODO: Get these versions from gradle
static constexpr const char* VERSION_NAME = "2.0";
static constexpr int VERSION = 2004;
static constexpr const char* VERSION_NAME = RIRU_MODULE_VERSION_NAME;
static constexpr int VERSION = DREAMLAND_VERSION_CODE;

static bool ShouldDisable();

Expand Down
2 changes: 1 addition & 1 deletion app/src/main/cpp/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ static auto module = RiruVersionedModuleInfo {
.moduleInfo = RiruModuleInfo {
.supportHide = true,
.version = Dreamland::VERSION,
.versionName = RIRU_MODULE_VERSION_NAME,
.versionName = Dreamland::VERSION_NAME,
.onModuleLoaded = onModuleLoaded,
.shouldSkipUid = shouldSkipUid,
.forkAndSpecializePre = forkAndSpecializePre,
Expand Down
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ ext {
ndkVersion = "21.3.6528147"
minSdkVersion = 24
targetSdkVersion = 30 // useless for magisk module
versionCode = 2004
versionCode = 2005
versionName = '2.0'
minMagiskVersion = 19000
riruApiVersion = 5 // For Riru v21
Expand Down

0 comments on commit e09e847

Please sign in to comment.