chore(android/app): Revert version.gradle

Keep build-utils code to just KMAPro so it doesn't affect FV Android
This commit is contained in:
Darcy Wong 2022-11-10 15:27:29 +07:00
parent 81588c9448
commit a0f546471f
2 changed files with 22 additions and 19 deletions

View file

@ -73,6 +73,8 @@ android {
applicationVariants.all { variant ->
// Append tier and environment to app name
// Beware: Gradle sync will nullify these values
executeBuildUtils()
String appSuffix = ''
String environment = VERSION_ENVIRONMENT
String tag = VERSION_TAG
@ -155,6 +157,25 @@ dependencies {
}
}
// Use build-utils.sh to get common build version info.
// Beware: Android Studio IDE Gradle sync will invalidate these values
def executeBuildUtils() {
try {
exec {
commandLine 'bash', '-c', 'pwd; THIS_SCRIPT=build.gradle; . ../../../resources/build/build-utils.sh'
}
}
catch(Exception e) {
GradleException("Exception: $e")
}
// Debugging
println "version.gradle TAG: " + System.getenv("VERSION_TAG") + ", ENVIRONMENT: " + System.getenv("VERSION_ENVIRONMENT");
ext {
VERSION_TAG=System.getenv("VERSION_TAG")
VERSION_ENVIRONMENT=System.getenv("VERSION_ENVIRONMENT")
}
}
/*def void dumpProperties(it){
//println "Examining $it.name:"
//println "Meta:"

View file

@ -57,26 +57,8 @@ def getVersionEnvironment = { ->
}
}
// Use build-utils.sh to get common build version info.
// Beware: Android Studio IDE Gradle sync will invalidate these values
def executeBuildUtils() {
try {
exec {
commandLine 'bash', '-c', 'pwd; THIS_SCRIPT=build.gradle; . ../../../resources/build/build-utils.sh'
}
}
catch(Exception e) {
GradleException("Exception: $e")
}
// Debugging
println "version.gradle TAG: " + System.getenv("VERSION_TAG") + ", ENVIRONMENT: " + System.getenv("VERSION_ENVIRONMENT");
}
executeBuildUtils()
ext {
VERSION_CODE=getVersionCode()
VERSION_NAME=getVersionName()
VERSION_ENVIRONMENT=System.getenv("VERSION_ENVIRONMENT")
VERSION_TAG=System.getenv("VERSION_TAG")
VERSION_ENVIRONMENT=getVersionEnvironment()
}