|
@@ -17,8 +17,8 @@ android {
|
17
|
17
|
applicationId = "com.xhkjedu.manageapp"
|
18
|
18
|
minSdk = 24
|
19
|
19
|
targetSdk = 30
|
20
|
|
- versionCode = 9
|
21
|
|
- versionName = "1.0.8"
|
|
20
|
+ versionCode = 10
|
|
21
|
+ versionName = "1.0.9"
|
22
|
22
|
|
23
|
23
|
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
|
24
|
24
|
vectorDrawables {
|
|
@@ -95,19 +95,18 @@ android {
|
95
|
95
|
return dateFormat.format(Date())
|
96
|
96
|
}
|
97
|
97
|
|
98
|
|
- /* android.applicationVariants.all {variant->
|
99
|
|
- variant.outputs.all {output->
|
100
|
|
- val versionName = variant.versionName
|
101
|
|
- val versionCode = variant.versionCode
|
102
|
|
- val variantName = variant.name
|
103
|
|
- val apkName = "Manage_App-$variantName-$versionName-$versionCode-${releaseTime()}.apk"
|
104
|
|
- *//* output.outputFile.renameTo(File(output.outputFile.parentFile,apkName))*//*
|
105
|
|
- val outputImpl = output as com.android.build.gradle.internal.api.BaseVariantOutputImpl
|
106
|
|
- outputImpl.outputFileName=apkName
|
107
|
|
- true
|
108
|
|
- }
|
109
|
|
- }*/
|
110
|
|
- applicationVariants.all(
|
|
98
|
+ applicationVariants.all{
|
|
99
|
+ val versionName = this.versionName
|
|
100
|
+ val versionCode = this.versionCode
|
|
101
|
+ val variantName = this.name
|
|
102
|
+ outputs.all {
|
|
103
|
+ if (this is com.android.build.gradle.internal.api.ApkVariantOutputImpl){
|
|
104
|
+ val fileName = "Manage_App-$variantName-$versionName-$versionCode-${releaseTime()}.apk"
|
|
105
|
+ this.outputFileName=fileName
|
|
106
|
+ }
|
|
107
|
+ }
|
|
108
|
+ }
|
|
109
|
+ /* applicationVariants.all(
|
111
|
110
|
object : Action<com.android.build.gradle.api.ApplicationVariant> {
|
112
|
111
|
override fun execute(variant: com.android.build.gradle.api.ApplicationVariant) {
|
113
|
112
|
println("variant: $variant")
|
|
@@ -128,7 +127,7 @@ android {
|
128
|
127
|
)
|
129
|
128
|
}
|
130
|
129
|
}
|
131
|
|
- )
|
|
130
|
+ )*/
|
132
|
131
|
}
|
133
|
132
|
|
134
|
133
|
dependencies {
|