Fixing non-release build signingConfig

This commit is contained in:
Kyle Hamilton 2023-11-22 09:29:22 -05:00
parent c8a36a6ccf
commit 080e411643

View File

@ -25,10 +25,13 @@ apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
def buildConfig = 'debug'
def keystoreProperties = new Properties()
def keystorePropertiesFile = rootProject.file('key.properties')
if (keystorePropertiesFile.exists()) {
keystoreProperties.load(new FileInputStream(keystorePropertiesFile))
buildConfig = 'release'
}
android {
@ -72,7 +75,11 @@ android {
release {
shrinkResources false
minifyEnabled false
if (buildConfig == 'release') {
signingConfig signingConfigs.release
} else {
signingConfig signingConfigs.debug
}
}
}