From caad0fb0f38da33bff003751313d2b873fc76c38 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=BB=80=E6=BC=93=E4=B8=A8Sevtinge?= <89193494+Sevtinge@users.noreply.github.com> Date: Sun, 28 Apr 2024 22:14:52 +0800 Subject: [PATCH] opt: debuginfo add gitcode --- app/build.gradle | 4 ++++ .../settings/development/DevelopmentDebugInfoFragment.java | 1 + 2 files changed, 5 insertions(+) diff --git a/app/build.gradle b/app/build.gradle index b16a3e3511..4288a17bcb 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -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 } @@ -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 } @@ -131,6 +133,7 @@ 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 } @@ -138,6 +141,7 @@ android { debug { versionNameSuffix "_" + gitHash + "_r" + gitCode buildConfigField "String", "GIT_HASH", "\"${gitHashLong}\"" + buildConfigField "String", "GIT_CODE", "\"${gitCode}\"" if (keyStoreFile != null) { signingConfig signingConfigs.hyperceiler } diff --git a/app/src/main/java/com/sevtinge/hyperceiler/ui/fragment/settings/development/DevelopmentDebugInfoFragment.java b/app/src/main/java/com/sevtinge/hyperceiler/ui/fragment/settings/development/DevelopmentDebugInfoFragment.java index 46201e83ad..b2af26d596 100644 --- a/app/src/main/java/com/sevtinge/hyperceiler/ui/fragment/settings/development/DevelopmentDebugInfoFragment.java +++ b/app/src/main/java/com/sevtinge/hyperceiler/ui/fragment/settings/development/DevelopmentDebugInfoFragment.java @@ -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) {