Skip to content
This repository was archived by the owner on Jul 16, 2024. It is now read-only.

Commit 129e51e

Browse files
committed
修改输出 apk 名称
1 parent 32ef748 commit 129e51e

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

buildSrc/src/main/kotlin/Extensions.kt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import com.android.build.gradle.internal.api.ApkVariantOutputImpl
77
import com.android.build.gradle.internal.dsl.BaseAppModuleExtension
88
import java.io.File
99
import java.nio.charset.Charset
10+
import java.util.Locale
1011
import java.util.Properties
1112
import org.gradle.api.JavaVersion
1213
import org.gradle.api.Project
@@ -203,7 +204,8 @@ fun Project.setupApp(
203204
applicationVariants.all {
204205
outputs.all {
205206
(this as? ApkVariantOutputImpl)?.outputFileName =
206-
"../../../../${appName}_${versionName}_${versionCode}_${flavorName}_${buildType.name}.apk"
207+
"../../../../${appName}_${versionName}_${versionCode}_" +
208+
"${flavorName.toLowerCase(Locale.ROOT)}_${buildType.name}.apk"
207209
}
208210
}
209211
block()

0 commit comments

Comments
 (0)