Commit 92357ce4 authored by zhaopengxiang's avatar zhaopengxiang

修改打包名称,更显version版本

parent c54af9b9
......@@ -50,6 +50,20 @@ android {
buildFeatures {
viewBinding true
}
android.applicationVariants.all { variant ->
variant.outputs.all { output ->
outputFileName = new File(output.outputFile.parent,
"${getAppChannel()}" + "_v" +
variant.versionName + "_" +
variant.versionCode + "_" +
variant.buildType.name + "_" +
"${buildTime()}" +
".apk"
).getName()
}
}
}
dependencies {
......@@ -89,4 +103,14 @@ dependencies {
debugImplementation 'com.squareup.leakcanary:leakcanary-android:2.7'
implementation 'com.contrarywind:Android-PickerView:4.1.9'
implementation 'com.guolindev.permissionx:permissionx:1.6.1'
}
static String buildTime() {
Date date = new Date()
String dates = date.format("yyyyMMddHHmm", TimeZone.getTimeZone("Asia/Shanghai"))
return dates
}
String getAppChannel() {
return project.channel
}
\ No newline at end of file
......@@ -19,4 +19,7 @@ android.useAndroidX=true
kotlin.code.style=official
android.enableJetifier=true
android.jetifier.blacklist=miya-print
android.useDeprecatedNdk=true
\ No newline at end of file
android.useDeprecatedNdk=true
#区别品牌
channel=CONVERSE
\ No newline at end of file
ext {
VERSION_CODE = 22
VERSION_NAME = '2.1.1'
VERSION_CODE = 23
VERSION_NAME = '2.1.2'
}
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment