
- static def releaseTime() {
- return new Date().format("yyyyMMdd.kkmm", TimeZone.getTimeZone("GMT+8"))
- }
-
- android.applicationVariants.all { variant ->
- println('============')
- println(variant.name)
-
- variant.outputs.each { output ->
- def file = output.outputFile
- output.outputFileName = file.name.replace(".apk", "-xxxx-${variant.versionName}-${variant.versionCode}-${releaseTime()}.apk")
- println(output.outputFileName)
-
- }
- }