Skip to content

Commit

Permalink
opt: debuginfo add gitcode
Browse files Browse the repository at this point in the history
  • Loading branch information
Sevtinge committed Apr 28, 2024
1 parent 9104019 commit caad0fb
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
4 changes: 4 additions & 0 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@ android {
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro', 'proguard-log.pro'
versionNameSuffix "_" + DateTimeFormatter.ofPattern("yyyyMMdd").format(LocalDateTime.now())
buildConfigField "String", "GIT_HASH", "\"${gitHash}\""
buildConfigField "String", "GIT_CODE", "\"${gitCode}\""
if (keyStoreFile != null) {
signingConfig signingConfigs.hyperceiler
}
Expand All @@ -121,6 +122,7 @@ android {
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
versionNameSuffix "_" + DateTimeFormatter.ofPattern("yyyyMMdd").format(LocalDateTime.now())
buildConfigField "String", "GIT_HASH", "\"${gitHashLong}\""
buildConfigField "String", "GIT_CODE", "\"${gitCode}\""
if (keyStoreFile != null) {
signingConfig signingConfigs.hyperceiler
}
Expand All @@ -131,13 +133,15 @@ android {
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
versionNameSuffix "_" + gitHash + "_r" + gitCode
buildConfigField "String", "GIT_HASH", "\"${gitHashLong}\""
buildConfigField "String", "GIT_CODE", "\"${gitCode}\""
if (keyStoreFile != null) {
signingConfig signingConfigs.hyperceiler
}
}
debug {
versionNameSuffix "_" + gitHash + "_r" + gitCode
buildConfigField "String", "GIT_HASH", "\"${gitHashLong}\""
buildConfigField "String", "GIT_CODE", "\"${gitCode}\""
if (keyStoreFile != null) {
signingConfig signingConfigs.hyperceiler
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ public String getDebugInfo() {
propertiesModule.put("BuildTime", "(UTC+0:00) " + BuildConfig.BUILD_TIME);
propertiesModule.put("BuildType", BuildConfig.BUILD_TYPE);
propertiesModule.put("GitHash", BuildConfig.GIT_HASH);
propertiesModule.put("GitCode", BuildConfig.GIT_CODE);
propertiesModule.put("Debug", String.valueOf(BuildConfig.DEBUG));
propertiesModule.put("ApplicationId", ProjectApi.mAppModulePkg);
} catch (Exception ignored) {
Expand Down

0 comments on commit caad0fb

Please sign in to comment.