From 59b07700493b308c7647b418b93bdff62a7b8ebb Mon Sep 17 00:00:00 2001 From: Feodor Fitsner Date: Mon, 20 Oct 2025 10:30:53 -0700 Subject: [PATCH] Update Android build to Gradle 8.10.2 and Kotlin 2.0.20 Upgraded Gradle wrapper to 8.10.2 and updated Android Gradle plugin to 8.6.1. Migrated Kotlin plugin to org.jetbrains.kotlin.android version 2.0.20 and set Java compatibility to 11. Removed legacy buildscript block for Kotlin in build.gradle for improved build configuration. --- {{cookiecutter.out_dir}}/android/app/build.gradle | 10 +++++----- {{cookiecutter.out_dir}}/android/build.gradle | 14 +------------- .../gradle/wrapper/gradle-wrapper.properties | 2 +- {{cookiecutter.out_dir}}/android/settings.gradle | 5 +++-- 4 files changed, 10 insertions(+), 21 deletions(-) diff --git a/{{cookiecutter.out_dir}}/android/app/build.gradle b/{{cookiecutter.out_dir}}/android/app/build.gradle index 8149dfa..c49b1e8 100644 --- a/{{cookiecutter.out_dir}}/android/app/build.gradle +++ b/{{cookiecutter.out_dir}}/android/app/build.gradle @@ -1,6 +1,6 @@ plugins { id "com.android.application" - id "kotlin-android" + id "org.jetbrains.kotlin.android" id "dev.flutter.flutter-gradle-plugin" } @@ -37,12 +37,12 @@ android { } compileOptions { - sourceCompatibility JavaVersion.VERSION_1_8 - targetCompatibility JavaVersion.VERSION_1_8 + sourceCompatibility JavaVersion.VERSION_11 + targetCompatibility JavaVersion.VERSION_11 } kotlinOptions { - jvmTarget = '1.8' + jvmTarget = '11' } sourceSets { @@ -102,4 +102,4 @@ flutter { source '../..' } -dependencies {} \ No newline at end of file +dependencies {} diff --git a/{{cookiecutter.out_dir}}/android/build.gradle b/{{cookiecutter.out_dir}}/android/build.gradle index fb86382..bc157bd 100644 --- a/{{cookiecutter.out_dir}}/android/build.gradle +++ b/{{cookiecutter.out_dir}}/android/build.gradle @@ -1,15 +1,3 @@ -buildscript { - ext.kotlin_version = '1.9.24' - repositories { - google() - mavenCentral() - } - - dependencies { - classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" - } -} - allprojects { repositories { google() @@ -27,4 +15,4 @@ subprojects { tasks.register("clean", Delete) { delete rootProject.buildDir -} \ No newline at end of file +} diff --git a/{{cookiecutter.out_dir}}/android/gradle/wrapper/gradle-wrapper.properties b/{{cookiecutter.out_dir}}/android/gradle/wrapper/gradle-wrapper.properties index a10c821..6b74f0f 100644 --- a/{{cookiecutter.out_dir}}/android/gradle/wrapper/gradle-wrapper.properties +++ b/{{cookiecutter.out_dir}}/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.7-bin.zip \ No newline at end of file +distributionUrl=https\://services.gradle.org/distributions/gradle-8.10.2-bin.zip diff --git a/{{cookiecutter.out_dir}}/android/settings.gradle b/{{cookiecutter.out_dir}}/android/settings.gradle index 209c9c4..b6722ac 100644 --- a/{{cookiecutter.out_dir}}/android/settings.gradle +++ b/{{cookiecutter.out_dir}}/android/settings.gradle @@ -23,7 +23,8 @@ pluginManagement { plugins { id "dev.flutter.flutter-plugin-loader" version "1.0.0" - id "com.android.application" version "8.3.1" apply false + id "com.android.application" version "8.6.1" apply false + id "org.jetbrains.kotlin.android" version "2.0.20" apply false } -include ":app" \ No newline at end of file +include ":app"