Last active
May 31, 2017 22:37
-
-
Save ewoks/96a17ff407b17d61ee766adceff95e6b to your computer and use it in GitHub Desktop.
All debug variants are signed with same (custom defined) debug.key , each release variant has it's own specific {flavor}_release_keystore. No default debug.key (autogenerated from system) is used
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
signingConfigs { | |
debug { | |
storeFile file("debug.keystore") | |
} | |
releaseBlue { | |
storeFile file('blue_release.keystore') | |
storePassword "blueblue" | |
keyAlias "alias_name" | |
keyPassword "blueblue" | |
} | |
releaseRed { | |
storeFile file('red_release.keystore') | |
storePassword "redred" | |
keyAlias "alias_name" | |
keyPassword "redred" | |
} | |
} | |
productFlavors { | |
blue { | |
applicationId "com.example.myapp.blue" | |
versionName "1.0-blue" | |
productFlavors.blue.signingConfig signingConfigs.releaseBlue | |
} | |
red { | |
applicationId "com.example.myapp.red" | |
versionName "1.0-red" | |
productFlavors.red.signingConfig signingConfigs.releaseRed | |
} | |
} | |
buildTypes { | |
debug { | |
applicationIdSuffix ".debug" | |
signingConfig signingConfigs.debug | |
// but if signingConfigs.debug is not defined in signingConfigs, default system debug.key would be used | |
} | |
release { | |
minifyEnabled false | |
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Guess it works like following:
Result - Signing setup works as expected: all debug variants are signed with defined debug.keystore (none is signed with system debug.key), each release variant has its own release key with which is signed.
Notes: