Browse Source

feat(cli): Upgrade gradle to 8.9 and gradle-android to 8.5.1 (#10507)

* feat(cli): Upgrade gradle to 8.9 and gradle-android to 8.5.1

* Update .changes/android-gradle-8-9.md

---------

Co-authored-by: Lucas Fernandes Nogueira <lucas@tauri.app>
Fabian-Lars 1 year ago
parent
commit
5f56cb0a8b

+ 6 - 0
.changes/android-gradle-8-9.md

@@ -0,0 +1,6 @@
+---
+'tauri-cli': 'patch:enhance'
+'@tauri-apps/cli': 'patch:enhance'
+---
+
+Update gradle to 8.9 and the gradle android plugin to 8.5.1 in the android templates (requires latest Android Studio). This should add support for Java 21 but Java 17 keeps being the recommended version.

+ 2 - 2
tooling/cli/templates/mobile/android/build.gradle.kts

@@ -4,8 +4,8 @@ buildscript {
         mavenCentral()
     }
     dependencies {
-        classpath("com.android.tools.build:gradle:8.3.2")
-        classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:1.6.21")
+        classpath("com.android.tools.build:gradle:8.5.1")
+        classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:1.9.25")
         {{~#each android-project-dependencies}}
         classpath("{{this}}"){{/each}}
     }

+ 1 - 1
tooling/cli/templates/mobile/android/buildSrc/build.gradle.kts

@@ -18,6 +18,6 @@ repositories {
 
 dependencies {
     compileOnly(gradleApi())
-    implementation("com.android.tools.build:gradle:8.3.2")
+    implementation("com.android.tools.build:gradle:8.5.1")
 }
 

+ 1 - 1
tooling/cli/templates/mobile/android/gradle/wrapper/gradle-wrapper.properties

@@ -1,6 +1,6 @@
 #Tue May 10 19:22:52 CST 2022
 distributionBase=GRADLE_USER_HOME
-distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-bin.zip
+distributionUrl=https\://services.gradle.org/distributions/gradle-8.9-bin.zip
 distributionPath=wrapper/dists
 zipStorePath=wrapper/dists
 zipStoreBase=GRADLE_USER_HOME