fixing build script

This commit is contained in:
Mariotaku Lee 2017-09-03 23:32:39 +08:00
parent 76f2affe7e
commit 7365137548
No known key found for this signature in database
GPG Key ID: 15C10F89D7C33535
1 changed files with 11 additions and 4 deletions

View File

@ -105,10 +105,17 @@ subprojects {
exclude 'META-INF/ASL2.0'
}
if (android.hasProperty('buildTypes') && project.plugins.hasPlugin('com.android.application')) {
android.buildTypes.each { buildType ->
def file = rootProject.file('private/signing.properties')
if (file.exists()) {
def file = rootProject.file('private/signing.properties')
if (project.plugins.hasPlugin('com.android.application') && file.exists()) {
if (android.hasProperty('buildTypes')) {
android.buildTypes.each { buildType ->
def cfg = signingConfigs.maybeCreate(buildType.name)
loadSigningConfig(cfg, file)
buildType.signingConfig = cfg
}
}
if (android.hasProperty('applicationVariants')) {
android.applicationVariants.each { buildType ->
def cfg = signingConfigs.maybeCreate(buildType.name)
loadSigningConfig(cfg, file)
buildType.signingConfig = cfg