mirror of
https://github.com/TrianguloY/LightningLauncher.git
synced 2024-12-26 09:58:20 +01:00
Link to an external properties file to get the release signing config, and avoid local modifications of the build.gradle file.
This commit is contained in:
parent
5d060169ef
commit
a1609096c5
1 changed files with 19 additions and 1 deletions
|
@ -14,6 +14,24 @@ def appendVersionNameVersionCode(variant, defaultConfig) {
|
|||
// output.packageApplication.outputFileName = fileName
|
||||
}
|
||||
}
|
||||
|
||||
if(project.hasProperty("signing.properties") && new File(project.property("signing.properties")).exists()) {
|
||||
|
||||
Properties props = new Properties()
|
||||
props.load(new FileInputStream(file(project.property("signing.properties"))))
|
||||
|
||||
android {
|
||||
signingConfigs {
|
||||
release {
|
||||
storeFile file(props['sp.storeFile'])
|
||||
keyAlias props['sp.keyAlias']
|
||||
storePassword props['sp.storePassword']
|
||||
keyPassword props['sp.keyPassword']
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
android {
|
||||
compileSdkVersion 26
|
||||
buildToolsVersion '26.0.2'
|
||||
|
@ -40,7 +58,7 @@ android {
|
|||
|
||||
minifyEnabled true
|
||||
proguardFiles 'proguard.cfg'
|
||||
//proguardFile getDefaultProguardFile('proguard-android-optimize.txt')
|
||||
signingConfig signingConfigs.release
|
||||
|
||||
applicationVariants.all { variant ->
|
||||
appendVersionNameVersionCode(variant, defaultConfig)
|
||||
|
|
Loading…
Reference in a new issue