diff options
| -rwxr-xr-x | .gitignore | 1 | ||||
| -rwxr-xr-x | android/app/build.gradle.kts | 22 |
2 files changed, 20 insertions, 3 deletions
@@ -43,3 +43,4 @@ app.*.map.json /android/app/debug
/android/app/profile
/android/app/release
+/android/key.properties
diff --git a/android/app/build.gradle.kts b/android/app/build.gradle.kts index 49f43c3..9c87981 100755 --- a/android/app/build.gradle.kts +++ b/android/app/build.gradle.kts @@ -1,3 +1,6 @@ +import java.util.Properties
+import java.io.FileInputStream
+
plugins {
id("com.android.application")
id("kotlin-android")
@@ -5,6 +8,12 @@ plugins { id("dev.flutter.flutter-gradle-plugin")
}
+val keystoreProperties = Properties()
+val keystorePropertiesFile = rootProject.file("key.properties")
+if (keystorePropertiesFile.exists()) {
+ keystoreProperties.load(FileInputStream(keystorePropertiesFile))
+}
+
android {
namespace = "com.botahamec.speedometer"
compileSdk = flutter.compileSdkVersion
@@ -30,11 +39,18 @@ android { versionName = flutter.versionName
}
+ signingConfigs {
+ create("release") {
+ keyAlias = keystoreProperties["keyAlias"] as String
+ keyPassword = keystoreProperties["keyPassword"] as String
+ storeFile = keystoreProperties["storeFile"]?.let { file(it) }
+ storePassword = keystoreProperties["storePassword"] as String
+ }
+ }
+
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.getByName("debug")
+ signingConfig = signingConfigs.getByName("release")
}
}
}
|
