chore: prepare android release

This commit is contained in:
Tien Do Nam
2022-12-28 03:18:30 +01:00
parent 5b49ef5c7f
commit 9fd4428ce2
2 changed files with 18 additions and 3 deletions
+3
View File
@@ -2,6 +2,9 @@
*.gen.dart
*.freezed.dart
/private_key.pepk
/upload-keystore.jks
# Miscellaneous
*.class
*.log
+15 -3
View File
@@ -25,6 +25,12 @@ apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
def keystoreProperties = new Properties()
def keystorePropertiesFile = rootProject.file('key.properties')
if (keystorePropertiesFile.exists()) {
keystoreProperties.load(new FileInputStream(keystorePropertiesFile))
}
android {
compileSdkVersion 33
ndkVersion flutter.ndkVersion
@@ -53,11 +59,17 @@ android {
versionName flutterVersionName
}
signingConfigs {
release {
keyAlias keystoreProperties['keyAlias']
keyPassword keystoreProperties['keyPassword']
storeFile keystoreProperties['storeFile'] ? file(keystoreProperties['storeFile']) : null
storePassword keystoreProperties['storePassword']
}
}
buildTypes {
release {
// TODO: Add your own signing config for the release build.
// Signing with the debug keys for now, so `flutter run --release` works.
signingConfig signingConfigs.debug
signingConfig signingConfigs.release
}
}
}