标签:form files name enable gettime oid new out rdf
buildTypes {
release {
minifyEnabled false
signingConfig signingConfigs.debug
proguardFiles getDefaultProguardFile(‘proguard-android.txt‘), ‘proguard-rules.pro‘
android.applicationVariants.all { variant ->
variant.outputs.all { output ->
def outputFile = output.outputFile
if (outputFile != null && outputFile.name.endsWith(‘.apk‘)) {
// apk名字-版本号-版本名称-生成时间.apk
outputFileName= "apk名字-${defaultConfig.versionCode}-${defaultConfig.versionName}-${releaseTime() }.apk"
}
}
}
}
}
def releaseTime() {
return new Date().format("yyyyMMdd", TimeZone.getTimeZone("UTC"))
}
标签:form files name enable gettime oid new out rdf
原文地址:https://blog.51cto.com/1206995290qq/2386405