Implementata variabile build version in Gradle
This commit is contained in:
parent
34c3093094
commit
fe528d69ab
BIN
.idea/caches/build_file_checksums.ser
generated
BIN
.idea/caches/build_file_checksums.ser
generated
Binary file not shown.
@ -15,6 +15,10 @@ apply plugin: 'kotlin-android-extensions'
|
|||||||
apply plugin: 'com.google.gms.google-services'
|
apply plugin: 'com.google.gms.google-services'
|
||||||
|
|
||||||
android {
|
android {
|
||||||
|
|
||||||
|
def appVersionCode = 18
|
||||||
|
def appVersionName = '1.0.15'
|
||||||
|
|
||||||
signingConfigs {
|
signingConfigs {
|
||||||
release {
|
release {
|
||||||
keyAlias 'wms key'
|
keyAlias 'wms key'
|
||||||
@ -29,8 +33,8 @@ android {
|
|||||||
applicationId "it.integry.integrywmsnative"
|
applicationId "it.integry.integrywmsnative"
|
||||||
minSdkVersion 21
|
minSdkVersion 21
|
||||||
targetSdkVersion 28
|
targetSdkVersion 28
|
||||||
versionCode 18
|
versionCode appVersionCode
|
||||||
versionName "1.0.15"
|
versionName appVersionName
|
||||||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||||||
signingConfig signingConfigs.release
|
signingConfig signingConfigs.release
|
||||||
}
|
}
|
||||||
@ -50,6 +54,14 @@ android {
|
|||||||
}
|
}
|
||||||
productFlavors {
|
productFlavors {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
build {
|
||||||
|
doLast {
|
||||||
|
delete "$projectDir/build/outputs/apk/release/version_v2.txt"
|
||||||
|
file("$projectDir/build/outputs/apk/release/version_v2.txt").text = appVersionCode + '\n' + appVersionName
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user