upgrade flutter
This commit is contained in:
@@ -1,85 +1,49 @@
|
||||
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')
|
||||
def keystorePropertiesFile = rootProject.file('dev-key.properties')
|
||||
if (keystorePropertiesFile.exists()) {
|
||||
keystoreProperties.load(new FileInputStream(keystorePropertiesFile))
|
||||
}
|
||||
|
||||
android {
|
||||
namespace = "com.mokkon.fcs.fcs"
|
||||
compileSdkVersion 34
|
||||
ndkVersion = "27.0.12077973"
|
||||
namespace = "com.example.fcs"
|
||||
compileSdk = 35
|
||||
ndkVersion = flutter.ndkVersion
|
||||
|
||||
compileOptions {
|
||||
sourceCompatibility = JavaVersion.VERSION_17
|
||||
targetCompatibility = JavaVersion.VERSION_17
|
||||
coreLibraryDesugaringEnabled true
|
||||
sourceCompatibility = JavaVersion.VERSION_1_8
|
||||
targetCompatibility = JavaVersion.VERSION_1_8
|
||||
}
|
||||
|
||||
kotlinOptions {
|
||||
jvmTarget = 17
|
||||
}
|
||||
|
||||
lintOptions {
|
||||
checkReleaseBuilds false
|
||||
jvmTarget = JavaVersion.VERSION_1_8
|
||||
}
|
||||
|
||||
defaultConfig {
|
||||
applicationId = "com.example.fcs"
|
||||
minSdkVersion 23
|
||||
targetSdkVersion 34
|
||||
versionCode flutterVersionCode.toInteger()
|
||||
versionName flutterVersionName
|
||||
multiDexEnabled true
|
||||
targetSdkVersion 35
|
||||
}
|
||||
|
||||
|
||||
flavorDimensions "fcs"
|
||||
productFlavors {
|
||||
prod {
|
||||
dimension "fcs"
|
||||
applicationId "com.mokkon.fcs"
|
||||
versionCode flutterVersionCode.toInteger()
|
||||
versionName flutterVersionName
|
||||
versionCode = flutter.versionCode
|
||||
versionName = flutter.versionName
|
||||
}
|
||||
dev {
|
||||
dimension "fcs"
|
||||
applicationId "com.mokkon.fcs.dev"
|
||||
versionCode flutterVersionCode.toInteger()
|
||||
versionName flutterVersionName
|
||||
versionCode = flutter.versionCode
|
||||
versionName = flutter.versionName
|
||||
}
|
||||
}
|
||||
|
||||
@@ -95,7 +59,6 @@ android {
|
||||
buildTypes {
|
||||
release {
|
||||
signingConfig signingConfigs.release
|
||||
|
||||
minifyEnabled true
|
||||
// useProguard false
|
||||
|
||||
@@ -103,11 +66,7 @@ android {
|
||||
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"
|
||||
// }
|
||||
newName = "${variant.productFlavors[0].dimension}_${variant.productFlavors[0].name}_v${variant.productFlavors[0].versionName}+${variant.productFlavors[0].versionCode}.apk"
|
||||
outputFileName = newName
|
||||
}
|
||||
}
|
||||
@@ -119,10 +78,6 @@ android {
|
||||
}
|
||||
|
||||
flutter {
|
||||
source '../..'
|
||||
source = "../.."
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation "androidx.multidex:multidex:2.0.1"
|
||||
coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:1.2.2'
|
||||
}
|
||||
Reference in New Issue
Block a user