Commit a38a379e authored by jianglx's avatar jianglx

添加打包时自动命名APK的功能

parent 3c34e55c
......@@ -50,9 +50,24 @@ android {
debuggable true
signingConfig signingConfigs.debug
}
android.applicationVariants.all { variant ->
variant.outputs.all {
//MedicalClient_{time}_v1.0.1_{build号}.apk
if (variant.buildType.name == 'release') {
def productVersion = "RV" + releaseTime() + "V" + defaultConfig.versionName + "Release" + ".apk";
outputFileName = productVersion
}
}
}
}
}
//打包的时间
static def releaseTime() {
return new Date().format("yyyyMMddHHss", TimeZone.getTimeZone("GMT+8"))
}
dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
api 'com.jakewharton:butterknife:9.0.0-rc1'
......
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