Skip to content

Commit

Permalink
Update build.gradle
Browse files Browse the repository at this point in the history
  • Loading branch information
LeoAndo authored Feb 26, 2023
1 parent 62dd349 commit 6515c46
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,12 @@ if (flutterVersionName == null) {
flutterVersionName = '1.0'
}

def keystoreProperties = new Properties()
def keystorePropertiesFile = rootProject.file('key.properties')
if (keystorePropertiesFile.exists()) {
keystoreProperties.load(new FileInputStream(keystorePropertiesFile))
}

apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
Expand Down Expand Up @@ -62,9 +68,9 @@ android {
debug { storeFile rootProject.file('debug.keystore') }
release {
storeFile rootProject.file('release.keystore')
storePassword localProperties.getProperty('ANDROID_STORE_PASSWORD')
keyAlias localProperties.getProperty('ANDROID_KEY_ALIAS')
keyPassword localProperties.getProperty('ANDROID_KEY_PASSWORD')
storePassword keystoreProperties['ANDROID_STORE_PASSWORD']
keyAlias keystoreProperties['ANDROID_KEY_ALIAS']
keyPassword keystoreProperties['ANDROID_KEY_PASSWORD']
}
}
buildTypes {
Expand Down

0 comments on commit 6515c46

Please sign in to comment.