mirror of
https://github.com/LittleTurtle2333/SimplicityTools.git
synced 2026-07-12 11:21:18 +08:00
修改生成的apk名字
This commit is contained in:
@@ -14,8 +14,6 @@ android {
|
||||
versionCode 75
|
||||
versionName '1.7.5-Yuki'
|
||||
buildConfigField("String", "BUILD_TIME", "\"${System.currentTimeMillis()}\"")
|
||||
|
||||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||||
}
|
||||
|
||||
buildTypes {
|
||||
@@ -44,6 +42,25 @@ android {
|
||||
lintOptions {
|
||||
checkReleaseBuilds false
|
||||
}
|
||||
android.applicationVariants.all { variant ->
|
||||
variant.outputs.each { output ->
|
||||
// 名称+当前版本号
|
||||
def fileName = "WooBoxForMIUI_v${defaultConfig.versionName}"
|
||||
|
||||
// 加入打包日期
|
||||
def releaseDate = new Date().format("MMddHHmmss", TimeZone.getDefault())
|
||||
fileName = fileName + "_${releaseDate}"
|
||||
|
||||
// 如果是debug版本,加入debug
|
||||
if ( variant.buildType.name =='debug') {
|
||||
fileName = fileName + "_debug"
|
||||
}else if(variant.buildType.name =='release') {
|
||||
fileName = fileName + "_release"
|
||||
}
|
||||
// 最终生成文件名
|
||||
output.outputFileName = fileName + ".apk"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
|
||||
Reference in New Issue
Block a user