Matthias Nott
2026-06-11 e74303c9bed248d6dd3f0440223c1edd297eb4e9
build(android): pin Gradle JVM to JDK 21

System default is openjdk 25, whose version string the Kotlin compiler
bundled by AGP cannot parse — IllegalArgumentException: 25.0.2 from
org.jetbrains.kotlin.com.intellij.util.lang.JavaVersion.parse. Pin
org.gradle.java.home to the brew JDK 21 install (LTS, supported).
1 files modified
changed files
android/gradle.properties patch | view | blame | history
android/gradle.properties
....@@ -1,2 +1,6 @@
11 org.gradle.jvmargs=-Xmx8G -XX:MaxMetaspaceSize=4G -XX:ReservedCodeCacheSize=512m -XX:+HeapDumpOnOutOfMemoryError
22 android.useAndroidX=true
3
+# System default Java is 25 — the Kotlin compiler bundled by AGP can't parse
4
+# that version string yet ("IllegalArgumentException: 25.0.2"). Pin Gradle to
5
+# Java 21 (LTS, fully supported).
6
+org.gradle.java.home=/opt/homebrew/Cellar/openjdk@21/21.0.11/libexec/openjdk.jdk/Contents/Home