Last active
November 25, 2017 06:56
-
-
Save elye/b04780c77cbbb4a0e843cc279bb48fa8 to your computer and use it in GitHub Desktop.
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
ext { | |
appVersionName = '1.0' | |
appPackageId = '<YourApplicationID>' | |
} | |
android { | |
compileSdkVersion 25 | |
buildToolsVersion "25.0.2" | |
defaultConfig { | |
applicationId "$appPackageId" | |
minSdkVersion 19 | |
targetSdkVersion 25 | |
versionCode 1 | |
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" | |
} | |
signingConfigs { | |
debug { | |
storeFile file("<YourDebugKeyStoreLocation>") | |
} | |
release { | |
storeFile file("<YourReleaseKeyStoreLocation>") | |
storePassword "<YourReleaseKeyStorPassword>" | |
keyAlias "<YourKeyAlias>" | |
keyPassword "<YourKeyAliasPassword>" | |
} | |
} | |
buildTypes { | |
debug { | |
minifyEnabled true | |
useProguard false | |
proguardFiles getDefaultProguardFile ('proguard-android.txt'), 'proguard-rules.pro' | |
signingConfig signingConfigs.debug | |
} | |
release { | |
minifyEnabled true | |
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' | |
signingConfig signingConfigs.release | |
} | |
} | |
productFlavors { | |
internal { | |
applicationId "$appPackageId" + ".internal" | |
versionName "i$appVersionName" | |
} | |
production { | |
applicationId "$appPackageId" | |
versionName "$appVersionName" | |
} | |
} | |
applicationVariants.all { variant -> | |
variant.outputs.each { output -> | |
//noinspection GroovyAssignabilityCheck | |
output.outputFile = new File(output.outputFile.parent, | |
output.outputFile.name.replace(".apk", "-${variant.versionName}.apk")) | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment