build, move the responsibility of the version string to the file where the version is actually managed, so that strings.xml does not also need edited every update.

This commit is contained in:
me
2026-10-01 21:20:12 -07:00
parent 04bf1d8b47
commit 288639514b
2 changed files with 6 additions and 0 deletions
+3
View File
@@ -10,6 +10,9 @@ android {
targetSdkVersion 36 targetSdkVersion 36
versionCode 11 versionCode 11
versionName "1.0.4" versionName "1.0.4"
applicationVariants.all { variant ->
variant.resValue "string", "version_number", "-=" + variant.versionName + " =-"
}
} }
buildTypes { buildTypes {
+3
View File
@@ -6,8 +6,11 @@
<string name="app_name_short">Carb Up!</string> <string name="app_name_short">Carb Up!</string>
<string name="action_settings">Settings</string> <string name="action_settings">Settings</string>
<string name="title_activity_main">Main</string> <string name="title_activity_main">Main</string>
<!-- Responsibility moved to build.gradle file, where the actual number exists.
<string name="version_name">-= Version Mango =-</string> <string name="version_name">-= Version Mango =-</string>
<string name="version_number">-= v1.0.2 =-</string> <string name="version_number">-= v1.0.2 =-</string>
-->
<string name="author">Hyperling</string> <string name="author">Hyperling</string>