From 1528ffbf38be559a23074582366ebf12ed5a01f7 Mon Sep 17 00:00:00 2001 From: Nikolaus Heger Date: Wed, 27 May 2026 12:08:55 +0800 Subject: [PATCH] update gradle and kotlin versions --- mobile-app/android/build.gradle | 4 ++-- mobile-app/android/gradle.properties | 10 ++++++++-- .../gradle/wrapper/gradle-wrapper.properties | 2 +- mobile-app/android/settings.gradle | 6 +++--- .../rust_builder/cargokit/gradle/plugin.gradle | 13 +++++++++---- 5 files changed, 23 insertions(+), 12 deletions(-) diff --git a/mobile-app/android/build.gradle b/mobile-app/android/build.gradle index 08a7a15e9..0d83ca9e4 100644 --- a/mobile-app/android/build.gradle +++ b/mobile-app/android/build.gradle @@ -1,13 +1,13 @@ buildscript { - ext.kotlin_version = '2.2.0' + ext.kotlin_version = '2.3.21' repositories { google() mavenCentral() } dependencies { - classpath 'com.android.tools.build:gradle:8.13.2' + classpath 'com.android.tools.build:gradle:9.2.0' classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" } } diff --git a/mobile-app/android/gradle.properties b/mobile-app/android/gradle.properties index f04df286f..dc0796954 100644 --- a/mobile-app/android/gradle.properties +++ b/mobile-app/android/gradle.properties @@ -9,7 +9,13 @@ android.nonTransitiveRClass=true android.nonFinalResIds=true # Disabled due to incompatibility with Flutter task and Cargokit plugin org.gradle.configuration-cache=false -# This builtInKotlin flag was added automatically by Flutter migrator android.builtInKotlin=false -# This newDsl flag was added automatically by Flutter migrator android.newDsl=false +android.defaults.buildfeatures.resvalues=true +android.sdk.defaultTargetSdkToCompileSdkIfUnset=false +android.enableAppCompileTimeRClass=false +android.usesSdkInManifest.disallowed=false +android.uniquePackageNames=false +android.dependency.useConstraints=true +android.r8.strictFullModeForKeepRules=false +android.r8.optimizedResourceShrinking=false diff --git a/mobile-app/android/gradle/wrapper/gradle-wrapper.properties b/mobile-app/android/gradle/wrapper/gradle-wrapper.properties index e6045a983..21a932ace 100644 --- a/mobile-app/android/gradle/wrapper/gradle-wrapper.properties +++ b/mobile-app/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.13-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-9.5.1-bin.zip diff --git a/mobile-app/android/settings.gradle b/mobile-app/android/settings.gradle index b6da7784d..18078aac2 100644 --- a/mobile-app/android/settings.gradle +++ b/mobile-app/android/settings.gradle @@ -18,11 +18,11 @@ pluginManagement { plugins { id "dev.flutter.flutter-plugin-loader" version "1.0.0" - id "com.android.application" version '8.13.2' apply false + id "com.android.application" version '9.2.0' apply false // START: FlutterFire Configuration - id "com.google.gms.google-services" version "4.3.15" apply false + id "com.google.gms.google-services" version "4.4.4" apply false // END: FlutterFire Configuration - id "org.jetbrains.kotlin.android" version "2.2.0" apply false + id "org.jetbrains.kotlin.android" version "2.3.21" apply false } include ":app" diff --git a/quantus_sdk/rust_builder/cargokit/gradle/plugin.gradle b/quantus_sdk/rust_builder/cargokit/gradle/plugin.gradle index 2532c7966..d62f8424c 100644 --- a/quantus_sdk/rust_builder/cargokit/gradle/plugin.gradle +++ b/quantus_sdk/rust_builder/cargokit/gradle/plugin.gradle @@ -2,7 +2,9 @@ /// Details: https://fzyzcjy.github.io/flutter_rust_bridge/manual/integrate/builtin import java.nio.file.Paths +import javax.inject.Inject import org.apache.tools.ant.taskdefs.condition.Os +import org.gradle.process.ExecOperations CargoKitPlugin.file = buildscript.sourceFile @@ -42,6 +44,9 @@ abstract class CargoKitBuildTask extends DefaultTask { @Input List targetPlatforms + @Inject + abstract ExecOperations getExecOperations() + @TaskAction def build() { if (project.cargokit.manifestDir == null) { @@ -58,14 +63,14 @@ abstract class CargoKitBuildTask extends DefaultTask { def manifestDir = Paths.get(project.buildscript.sourceFile.parent, project.cargokit.manifestDir) def rootProjectDir = project.rootProject.projectDir - + if (!Os.isFamily(Os.FAMILY_WINDOWS)) { - project.exec { + execOperations.exec { commandLine 'chmod', '+x', path } } - - project.exec { + + execOperations.exec { executable path args "build-gradle" environment "CARGOKIT_ROOT_PROJECT_DIR", rootProjectDir