diff --git a/flutter/android/app/build.gradle b/flutter/android/app/build.gradle index 606f6d0..dda70b1 100644 --- a/flutter/android/app/build.gradle +++ b/flutter/android/app/build.gradle @@ -3,7 +3,9 @@ plugins { // START: FlutterFire Configuration id 'com.google.gms.google-services' // END: FlutterFire Configuration - id "kotlin-android" + // Kotlin is provided by Flutter's built-in Kotlin support (the flutter-gradle-plugin + // auto-applies kotlin-android). KGP stays declared in settings.gradle so it remains + // on the classpath. See https://docs.flutter.dev/release/breaking-changes/migrate-to-built-in-kotlin/for-app-developers id "dev.flutter.flutter-gradle-plugin" } @@ -42,10 +44,6 @@ android { targetCompatibility JavaVersion.VERSION_17 } - kotlinOptions { - jvmTarget = '17' - } - sourceSets { main.java.srcDirs += 'src/main/kotlin' } @@ -75,6 +73,12 @@ android { } } +kotlin { + compilerOptions { + jvmTarget = org.jetbrains.kotlin.gradle.dsl.JvmTarget.JVM_17 + } +} + flutter { source '../..' } diff --git a/flutter/android/gradle.properties b/flutter/android/gradle.properties index 598d13f..f2122b2 100644 --- a/flutter/android/gradle.properties +++ b/flutter/android/gradle.properties @@ -1,3 +1,7 @@ org.gradle.jvmargs=-Xmx4G android.useAndroidX=true android.enableJetifier=true +# This builtInKotlin flag was added automatically by Flutter migrator +android.builtInKotlin=false +# This newDsl flag was added automatically by Flutter migrator +android.newDsl=false