Skip to content

Commit

Permalink
Optimize system compilation
Browse files Browse the repository at this point in the history
  • Loading branch information
sanfengAndroid committed Feb 20, 2021
1 parent 8054425 commit ffc9337
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ def linkerModuleName = 'fake-linker'
def hookInstallModuleName = 'hook-install'
def mVersionCode = 1100
def mVersionName = "1.1"
def buildApi = rootProject.props['buildApi'] ?: rootProject.targetSdk
def buildApi = rootProject.props['buildApi'] ?: 30

android {
compileSdkVersion 30
Expand All @@ -46,7 +46,7 @@ android {
arguments "-DANDROID_PLATFORM=${buildApi}", "-DLINKER_MODULE_NAME=${linkerModuleName}",
"-DMERGE_BUILD=" + (rootProject.props['mergeBuild']?:true),
"-DHOOK_INSTALL_MODULE_NAME=${hookInstallModuleName}",
"-DHOOK_LOG_LEVEL="+ (rootProject.props['logLevel']?:2),
"-DHOOK_LOG_LEVEL="+ (rootProject.props['logLevel']),
"-DMODULE_VERSION=${mVersionCode}",
"-DMODULE_VERSION_NAME=\"${mVersionName}\""
}
Expand Down
2 changes: 1 addition & 1 deletion src/main/cpp/common/alog.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ extern int g_log_level;
#define LOG_TAG "HookLog"
#define _PRINT(v, format, ...) \
do { \
if(g_log_level < (v)) __android_log_print(v, LOG_TAG, format, ##__VA_ARGS__); \
if(g_log_level <= (v)) __android_log_print(v, LOG_TAG, format, ##__VA_ARGS__); \
}while(0)

#define LOGV(format, ...) _PRINT(ANDROID_LOG_VERBOSE, format, ##__VA_ARGS__)
Expand Down
2 changes: 1 addition & 1 deletion src/main/cpp/common/module_config.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@

#define HOOK_LOG_LEVEL 2
#define HOOK_LOG_LEVEL 1
#define MODULE_VERSION 1100
#define MODULE_VERSION_NAME "1.1"

0 comments on commit ffc9337

Please # to comment.