diff --git a/android/app/build.gradle b/android/app/build.gradle index ae26fd2..75070dd 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -1,3 +1,10 @@ +plugins { + id "com.android.application" + id "kotlin-android" + id "dev.flutter.flutter-gradle-plugin" + id 'com.google.gms.google-services' +} + def localProperties = new Properties() def localPropertiesFile = rootProject.file('local.properties') if (localPropertiesFile.exists()) { @@ -6,11 +13,6 @@ if (localPropertiesFile.exists()) { } } -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' @@ -21,21 +23,12 @@ if (flutterVersionName == null) { flutterVersionName = '1.0' } -apply plugin: 'com.android.application' -// START: FlutterFire Configuration -apply plugin: 'com.google.gms.google-services' -// END: FlutterFire Configuration -apply plugin: 'kotlin-android' -apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle" - - def keystoreProperties = new Properties() def keystorePropertiesFile = rootProject.file('key.properties') if (keystorePropertiesFile.exists()) { keystoreProperties.load(new FileInputStream(keystorePropertiesFile)) } - android { namespace "vn.smatec.sfm" compileSdkVersion 35 @@ -44,12 +37,12 @@ android { compileOptions { // Flag to enable support for the new language APIs coreLibraryDesugaringEnabled true - sourceCompatibility JavaVersion.VERSION_1_8 - targetCompatibility JavaVersion.VERSION_1_8 + sourceCompatibility JavaVersion.VERSION_17 + targetCompatibility JavaVersion.VERSION_17 } kotlinOptions { - jvmTarget = '1.8' + jvmTarget = '17' } sourceSets { @@ -102,9 +95,9 @@ flutter { } dependencies { - implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" - implementation 'com.google.firebase:firebase-messaging-directboot:20.2.0' - coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:1.2.2' +// implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" + implementation platform('com.google.firebase:firebase-bom:33.15.0') + coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:2.1.5' implementation 'androidx.window:window:1.0.0' implementation 'androidx.window:window-java:1.0.0' } diff --git a/android/build.gradle b/android/build.gradle index 1683e4e..0804b52 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -1,21 +1,9 @@ -buildscript { - ext.kotlin_version = '1.8.22' - repositories { - google() - mavenCentral() - } - - dependencies { - // START: FlutterFire Configuration - classpath 'com.google.gms:google-services:4.3.15' - // END: FlutterFire Configuration - classpath 'com.android.tools.build:gradle:8.2.1' - classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" - } +plugins { + id 'com.google.gms.google-services' version '4.4.2' apply false } - allprojects { repositories { + gradlePluginPortal() google() mavenCentral() } @@ -43,3 +31,7 @@ subprojects { tasks.register("clean", Delete) { delete rootProject.buildDir } + + + + diff --git a/android/gradle/wrapper/gradle-wrapper.properties b/android/gradle/wrapper/gradle-wrapper.properties index b5fc5a7..53aec70 100644 --- a/android/gradle/wrapper/gradle-wrapper.properties +++ b/android/gradle/wrapper/gradle-wrapper.properties @@ -2,4 +2,4 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.2-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.2-all.zip diff --git a/android/settings.gradle b/android/settings.gradle index a42444d..23e8403 100644 --- a/android/settings.gradle +++ b/android/settings.gradle @@ -18,7 +18,7 @@ pluginManagement { plugins { id "dev.flutter.flutter-plugin-loader" version "1.0.0" - id "com.android.application" version "8.2.1" apply false + id "com.android.application" version "8.3.0" apply false id "org.jetbrains.kotlin.android" version "1.8.22" apply false } diff --git a/pubspec.lock b/pubspec.lock index 8f13221..6185db9 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -269,10 +269,10 @@ packages: dependency: "direct main" description: name: flex_color_scheme - sha256: ae638050fceb35b6040a43cf67892f9b956022068e736284919d93322fdd4ba2 + sha256: "3344f8f6536c6ce0473b98e9f084ef80ca89024ad3b454f9c32cf840206f4387" url: "https://pub.dev" source: hosted - version: "8.1.1" + version: "8.2.0" flex_seed_scheme: dependency: transitive description: @@ -1060,4 +1060,4 @@ packages: version: "3.1.3" sdks: dart: ">=3.7.0-0 <4.0.0" - flutter: ">=3.27.0" + flutter: ">=3.29.0" diff --git a/pubspec.yaml b/pubspec.yaml index 36f3276..5eb39c8 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -21,7 +21,7 @@ dependencies: flutter_local_notifications: ^17.2.4 permission_handler: ^11.0.1 # flex_color_scheme: ^7.2.0 - flex_color_scheme: ^8.1.0 + flex_color_scheme: ^8.2.0 go_router: ^13.1.0 http: ^1.3.0 top_snackbar_flutter: ^3.1.0