Android: build on JDK 25 with Gradle 9.6.1, AGP 9.4.1, Kotlin 2.2.10
Android Studio now bundles JBR 25, which Gradle 8.14's embedded Kotlin can't parse. Follow Tauri's current template: Gradle 9.6.1, Kotlin 2.2.10, the builtInKotlin/newDsl/failOnMissingFiles compatibility flags, the compilerOptions DSL, and ExecOperations in BuildTask (project.exec is gone in Gradle 9). AGP goes to 9.4.1 rather than the template's 9.3.1. Release lint vital is turned off: AGP 9.3/9.4's lint crashes analysing the .gradle.kts scripts (findFirCompiledSymbol), failing every release build. The env scripts now accept JDK 17 through 25, preferring Studio's JBR.
This commit is contained in:
@@ -21,4 +21,10 @@ kotlin.code.style=official
|
||||
# resources declared in the library itself and none from the library's dependencies,
|
||||
# thereby reducing the size of the R class for that library
|
||||
android.nonTransitiveRClass=true
|
||||
android.nonFinalResIds=false
|
||||
android.nonFinalResIds=false
|
||||
|
||||
# From Tauri's Gradle 9 template: plugin crates ship consumer-rules.pro
|
||||
# references that don't exist, and still use the pre-AGP-9 Kotlin setup.
|
||||
android.proguard.failOnMissingFiles=false
|
||||
android.builtInKotlin=false
|
||||
android.newDsl=false
|
||||
|
||||
Reference in New Issue
Block a user