128 lines
3.6 KiB
Groovy
128 lines
3.6 KiB
Groovy
plugins {
|
|
id "com.android.application"
|
|
// START: FlutterFire Configuration
|
|
id 'com.google.gms.google-services'
|
|
// END: FlutterFire Configuration
|
|
id "kotlin-android"
|
|
// The Flutter Gradle Plugin must be applied after the Android and Kotlin Gradle plugins.
|
|
id "dev.flutter.flutter-gradle-plugin"
|
|
}
|
|
|
|
|
|
def localProperties = new Properties()
|
|
def localPropertiesFile = rootProject.file('local.properties')
|
|
if (localPropertiesFile.exists()) {
|
|
localPropertiesFile.withReader('UTF-8') { reader ->
|
|
localProperties.load(reader)
|
|
}
|
|
}
|
|
|
|
def flutterRoot = localProperties.getProperty('flutter.sdk')
|
|
if (flutterRoot == null) {
|
|
throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.")
|
|
}
|
|
|
|
def flutterVersionCode = localProperties.getProperty('flutter.versionCode')
|
|
if (flutterVersionCode == null) {
|
|
flutterVersionCode = '1'
|
|
}
|
|
|
|
def flutterVersionName = localProperties.getProperty('flutter.versionName')
|
|
if (flutterVersionName == null) {
|
|
flutterVersionName = '1.0'
|
|
}
|
|
|
|
|
|
def keystoreProperties = new Properties()
|
|
def keystorePropertiesFile = rootProject.file('key.properties')
|
|
if (keystorePropertiesFile.exists()) {
|
|
keystoreProperties.load(new FileInputStream(keystorePropertiesFile))
|
|
}
|
|
|
|
android {
|
|
namespace = "com.mokkon.fcs.fcs"
|
|
compileSdkVersion 34
|
|
ndkVersion = "27.0.12077973"
|
|
|
|
compileOptions {
|
|
sourceCompatibility = JavaVersion.VERSION_17
|
|
targetCompatibility = JavaVersion.VERSION_17
|
|
coreLibraryDesugaringEnabled true
|
|
}
|
|
|
|
kotlinOptions {
|
|
jvmTarget = 17
|
|
}
|
|
|
|
lintOptions {
|
|
checkReleaseBuilds false
|
|
}
|
|
|
|
defaultConfig {
|
|
minSdkVersion 23
|
|
targetSdkVersion 34
|
|
versionCode flutterVersionCode.toInteger()
|
|
versionName flutterVersionName
|
|
multiDexEnabled true
|
|
}
|
|
|
|
|
|
flavorDimensions "fcs"
|
|
productFlavors {
|
|
prod {
|
|
dimension "fcs"
|
|
applicationId "com.mokkon.fcs"
|
|
versionCode flutterVersionCode.toInteger()
|
|
versionName flutterVersionName
|
|
}
|
|
dev {
|
|
dimension "fcs"
|
|
applicationId "com.mokkon.fcs.dev"
|
|
versionCode flutterVersionCode.toInteger()
|
|
versionName flutterVersionName
|
|
}
|
|
}
|
|
|
|
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
|
|
// if (buildType == 'debug'){
|
|
// newName = "app-${variant.getFlavorName()}-debug.apk"
|
|
// } else {
|
|
newName = "${variant.productFlavors[0].dimension}_${variant.productFlavors[0].name}_v${defaultConfig.versionName}+${defaultConfig.versionCode}.apk"
|
|
// }
|
|
outputFileName = newName
|
|
}
|
|
}
|
|
}
|
|
debug {
|
|
debuggable true
|
|
}
|
|
}
|
|
}
|
|
|
|
flutter {
|
|
source '../..'
|
|
}
|
|
|
|
dependencies {
|
|
implementation "androidx.multidex:multidex:2.0.1"
|
|
coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:1.2.2'
|
|
} |