93 lines
2.5 KiB
Kotlin
93 lines
2.5 KiB
Kotlin
import java.util.Properties
|
|
import java.io.FileInputStream
|
|
|
|
plugins {
|
|
id("com.android.application")
|
|
id("kotlin-android")
|
|
// The Flutter Gradle Plugin must be applied after the Android and Kotlin Gradle 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.savefamily.app"
|
|
compileSdk = flutter.compileSdkVersion
|
|
ndkVersion = flutter.ndkVersion
|
|
|
|
compileOptions {
|
|
sourceCompatibility = JavaVersion.VERSION_11
|
|
targetCompatibility = JavaVersion.VERSION_11
|
|
}
|
|
|
|
kotlinOptions {
|
|
jvmTarget = JavaVersion.VERSION_11.toString()
|
|
}
|
|
|
|
defaultConfig {
|
|
applicationId = "com.savefamily.app"
|
|
|
|
minSdk = flutter.minSdkVersion
|
|
|
|
targetSdk = flutter.targetSdkVersion
|
|
versionCode = flutter.versionCode
|
|
versionName = flutter.versionName
|
|
}
|
|
|
|
packaging {
|
|
jniLibs {
|
|
keepDebugSymbols.add("*/*/libscm.so")
|
|
useLegacyPackaging = true
|
|
}
|
|
}
|
|
|
|
signingConfigs {
|
|
create("release") {
|
|
keyAlias = keystoreProperties["keyAlias"] as String?
|
|
keyPassword = keystoreProperties["keyPassword"] as String?
|
|
storeFile = keystoreProperties["storeFile"]?.let { file(it as String) }
|
|
storePassword = keystoreProperties["storePassword"] as String?
|
|
}
|
|
}
|
|
|
|
buildTypes {
|
|
release {
|
|
signingConfig = signingConfigs.getByName("release")
|
|
proguardFiles(getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro")
|
|
}
|
|
debug {
|
|
proguardFiles(getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro")
|
|
isMinifyEnabled = false
|
|
isShrinkResources = false
|
|
}
|
|
}
|
|
|
|
flavorDimensions += "app"
|
|
|
|
productFlavors {
|
|
create("development") {
|
|
dimension = "app"
|
|
applicationIdSuffix = ".dev"
|
|
resValue("string", "app_name", "SF Dev")
|
|
}
|
|
create("staging") {
|
|
dimension = "app"
|
|
applicationIdSuffix = ".stag"
|
|
resValue("string", "app_name", "SF Staging")
|
|
}
|
|
create("production") {
|
|
dimension = "app"
|
|
resValue("string", "app_name", "SaveFamily")
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
flutter {
|
|
source = "../.."
|
|
}
|