Last active
December 22, 2015 21:29
-
-
Save xalexchen/6533922 to your computer and use it in GitHub Desktop.
rename final apk accoring to build time
This file contains 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
String VERSION_NAME = "v0.0.1" | |
int VERSION_CODE = 1 | |
String APK_NAME = "Hello" | |
android { | |
compileSdkVersion 18 | |
buildToolsVersion "18.0.1" | |
defaultConfig { | |
minSdkVersion 10 | |
targetSdkVersion 18 | |
versionCode VERSION_CODE | |
versionName VERSION_NAME | |
} | |
signingConfigs { | |
myConfig { | |
storeFile file('android') | |
storePassword "android" | |
keyAlias "android" | |
keyPassword "android" | |
} | |
} | |
buildTypes { | |
release { | |
buildDate = new SimpleDateFormat("yyyyMMddHHmm").format(new Date()) | |
project.archivesBaseName = APK_NAME+"-"+VERSION_NAME + "-"+buildDate; | |
zipAlign true | |
signingConfig signingConfigs.myConfig | |
runProguard true | |
proguardFile file('proguard.txt') | |
} | |
debug { | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment