|
@@ -5,6 +5,9 @@ plugins {
|
|
|
id("dev.flutter.flutter-gradle-plugin")
|
|
id("dev.flutter.flutter-gradle-plugin")
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+import java.util.Properties
|
|
|
|
|
+import java.io.FileInputStream
|
|
|
|
|
+
|
|
|
android {
|
|
android {
|
|
|
namespace = "com.dinnoni.asr_client"
|
|
namespace = "com.dinnoni.asr_client"
|
|
|
compileSdk = flutter.compileSdkVersion
|
|
compileSdk = flutter.compileSdkVersion
|
|
@@ -19,6 +22,27 @@ android {
|
|
|
jvmTarget = JavaVersion.VERSION_17.toString()
|
|
jvmTarget = JavaVersion.VERSION_17.toString()
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ val keystorePropertiesFile = rootProject.file("key.properties")
|
|
|
|
|
+ val keystoreProperties = Properties()
|
|
|
|
|
+ if (keystorePropertiesFile.exists()) {
|
|
|
|
|
+ keystoreProperties.load(FileInputStream(keystorePropertiesFile))
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ signingConfigs {
|
|
|
|
|
+ create("release") {
|
|
|
|
|
+ keyAlias = keystoreProperties["keyAlias"] as String
|
|
|
|
|
+ keyPassword = keystoreProperties["keyPassword"] as String
|
|
|
|
|
+ storeFile = file(keystoreProperties["storeFile"] as String)
|
|
|
|
|
+ storePassword = keystoreProperties["storePassword"] as String
|
|
|
|
|
+ }
|
|
|
|
|
+ getByName("debug") {
|
|
|
|
|
+ keyAlias = keystoreProperties["keyAlias"] as String
|
|
|
|
|
+ keyPassword = keystoreProperties["keyPassword"] as String
|
|
|
|
|
+ storeFile = file(keystoreProperties["storeFile"] as String)
|
|
|
|
|
+ storePassword = keystoreProperties["storePassword"] as String
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
defaultConfig {
|
|
defaultConfig {
|
|
|
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
|
|
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
|
|
|
applicationId = "com.dinnoni.asr_client"
|
|
applicationId = "com.dinnoni.asr_client"
|
|
@@ -32,8 +56,15 @@ android {
|
|
|
|
|
|
|
|
buildTypes {
|
|
buildTypes {
|
|
|
release {
|
|
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("release")
|
|
|
|
|
+ isMinifyEnabled = false
|
|
|
|
|
+ isShrinkResources = false
|
|
|
|
|
+ proguardFiles(
|
|
|
|
|
+ getDefaultProguardFile("proguard-android-optimize.txt"),
|
|
|
|
|
+ "proguard-rules.pro"
|
|
|
|
|
+ )
|
|
|
|
|
+ }
|
|
|
|
|
+ debug {
|
|
|
signingConfig = signingConfigs.getByName("debug")
|
|
signingConfig = signingConfigs.getByName("debug")
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|