Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ext {
- appVersionName = '1.0'
- appPackageId = '<AppID>'
- }
- 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("<DebugKeyStoreLocation>")
- }
- release {
- storeFile file("<ReleaseKeyStoreLocation>")
- storePassword "<ReleaseKeyStorePassword>"
- keyAlias "<KeyAlias>"
- keyPassword "<KeyPassword>"
- }
- }
- buildTypes {
- debug {
- minifyEnabled false
- 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 {
- debug {
- applicationId "$appPackageId" + ".debug"
- versionName "$appVersionName"
- }
- staging {
- applicationId "$appPackageId" + ".staging"
- versionName "$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"))
- }
- }
- }
Add Comment
Please, Sign In to add comment