84 lines
2.3 KiB
Groovy
84 lines
2.3 KiB
Groovy
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"
|
|
}
|
|
|
|
def keystoreProperties = new Properties()
|
|
def keystorePropertiesFile = rootProject.file('dev-key.properties')
|
|
if (keystorePropertiesFile.exists()) {
|
|
keystoreProperties.load(new FileInputStream(keystorePropertiesFile))
|
|
}
|
|
|
|
android {
|
|
namespace = "com.example.fcs"
|
|
compileSdk = 35
|
|
ndkVersion = flutter.ndkVersion
|
|
|
|
compileOptions {
|
|
sourceCompatibility = JavaVersion.VERSION_1_8
|
|
targetCompatibility = JavaVersion.VERSION_1_8
|
|
}
|
|
|
|
kotlinOptions {
|
|
jvmTarget = JavaVersion.VERSION_1_8
|
|
}
|
|
|
|
defaultConfig {
|
|
applicationId = "com.example.fcs"
|
|
minSdkVersion 23
|
|
targetSdkVersion 35
|
|
}
|
|
|
|
flavorDimensions "fcs"
|
|
productFlavors {
|
|
prod {
|
|
dimension "fcs"
|
|
applicationId "com.mokkon.fcs"
|
|
versionCode = flutter.versionCode
|
|
versionName = flutter.versionName
|
|
}
|
|
dev {
|
|
dimension "fcs"
|
|
applicationId "com.mokkon.fcs.dev"
|
|
versionCode = flutter.versionCode
|
|
versionName = flutter.versionName
|
|
}
|
|
}
|
|
|
|
signingConfigs {
|
|
release {
|
|
keyAlias keystoreProperties['keyAlias']
|
|
keyPassword keystoreProperties['keyPassword']
|
|
storeFile file(keystoreProperties['storeFile'])
|
|
storePassword keystoreProperties['storePassword']
|
|
}
|
|
}
|
|
|
|
buildTypes {
|
|
release {
|
|
signingConfig signingConfigs.release
|
|
minifyEnabled true
|
|
// useProguard false
|
|
|
|
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
|
|
applicationVariants.all { variant ->
|
|
variant.outputs.all {
|
|
def newName
|
|
newName = "${variant.productFlavors[0].dimension}_${variant.productFlavors[0].name}_v${variant.productFlavors[0].versionName}+${variant.productFlavors[0].versionCode}.apk"
|
|
outputFileName = newName
|
|
}
|
|
}
|
|
}
|
|
debug {
|
|
debuggable true
|
|
}
|
|
}
|
|
}
|
|
|
|
flutter {
|
|
source = "../.."
|
|
}
|
|
|