Last active
July 16, 2021 06:46
-
-
Save zhangzhibin/26cbcc017c6ac599074617937f5a3834 to your computer and use it in GitHub Desktop.
set better name for output file in android studio with build.gradle https://xmanyou.com/android-studio-build-file-with-better-name/
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
defaultConfig { | |
applicationId "com.xmanyou.my.game" | |
minSdkVersion 21 | |
targetSdkVersion 30 | |
versionCode 28 | |
versionName "1.2.5" | |
def gitCommit = "git rev-parse --short HEAD".execute().text.trim() | |
archivesBaseName = "${defaultConfig.applicationId}-${defaultConfig.versionName}v${defaultConfig.versionCode}-${gitCommit}" | |
println 'outputFileName: after = ' + archivesBaseName | |
} | |
// the output will be: | |
// com.xmanyou.my.game-1.2.5v28-943fbca-release.apk | |
// or | |
// com.xmanyou.my.game-1.2.5v28-943fbca.aab | |
// more refer to https://xmanyou.com/android-ru-he-rang-sheng-cheng-de-apk/ | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment