From 1064a0b33fab3d3f785718cb9b622b5e4c8bf910 Mon Sep 17 00:00:00 2001 From: Hyperling Date: Sat, 12 Sep 2026 20:27:55 -0700 Subject: [PATCH] Successful settings to build on Android!! Finally! --- android/app/build.gradle.kts | 18 +++++++++++++----- .../gradle/wrapper/gradle-wrapper.properties | 4 +++- android/settings.gradle.kts | 8 ++++++-- 3 files changed, 22 insertions(+), 8 deletions(-) diff --git a/android/app/build.gradle.kts b/android/app/build.gradle.kts index 6e433af..a6dde87 100644 --- a/android/app/build.gradle.kts +++ b/android/app/build.gradle.kts @@ -1,22 +1,30 @@ plugins { id("com.android.application") - id("kotlin-android") + + // This will need removed in Gradle/AGP 9. + id("org.jetbrains.kotlin.android") // id("kotlin-android") + // The Flutter Gradle Plugin must be applied after the Android and Kotlin Gradle plugins. id("dev.flutter.flutter-gradle-plugin") } +import org.jetbrains.kotlin.gradle.dsl.JvmTarget + android { namespace = "com.hyperling.sunset_alarm" compileSdk = flutter.compileSdkVersion ndkVersion = flutter.ndkVersion compileOptions { - sourceCompatibility = JavaVersion.VERSION_11 - targetCompatibility = JavaVersion.VERSION_11 + targetCompatibility = JavaVersion.VERSION_17 + sourceCompatibility = JavaVersion.VERSION_17 } - kotlinOptions { - jvmTarget = JavaVersion.VERSION_11.toString() + // This will need removed in Gradle/AGP 9. + kotlin { + compilerOptions { + jvmTarget.set(JvmTarget.JVM_17) + } } defaultConfig { diff --git a/android/gradle/wrapper/gradle-wrapper.properties b/android/gradle/wrapper/gradle-wrapper.properties index afa1e8e..342eb8c 100644 --- a/android/gradle/wrapper/gradle-wrapper.properties +++ b/android/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,7 @@ +#Sat Sep 12 19:36:23 MST 2026 distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists +distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.5-bin.zip +#distributionUrl=https\://services.gradle.org/distributions/gradle-9.1.0-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.10.2-all.zip diff --git a/android/settings.gradle.kts b/android/settings.gradle.kts index a439442..80fcf29 100644 --- a/android/settings.gradle.kts +++ b/android/settings.gradle.kts @@ -18,8 +18,12 @@ pluginManagement { plugins { id("dev.flutter.flutter-plugin-loader") version "1.0.0" - id("com.android.application") version "8.7.0" apply false - id("org.jetbrains.kotlin.android") version "1.8.22" apply false + + id("com.android.application") version "8.13.0" apply false + //id("com.android.application") version "9.0.1" apply false + + // This will need removed in Gradle/AGP 9. + id("org.jetbrains.kotlin.android") version "2.4.20" apply false } include(":app")