{"id":"afcc54a5-4beb-4e23-9c09-63370f4679bc","slug":"gradle-bug-exception-in-phase-semantic-analysis-c3ae","url":"https://api.modalhub.ai/r/gradle-bug-exception-in-phase-semantic-analysis-c3ae","urls":{"html":"https://api.modalhub.ai/r/gradle-bug-exception-in-phase-semantic-analysis-c3ae","md":"https://api.modalhub.ai/r/gradle-bug-exception-in-phase-semantic-analysis-c3ae.md","json":"https://api.modalhub.ai/r/gradle-bug-exception-in-phase-semantic-analysis-c3ae.json","history":"https://api.modalhub.ai/r/gradle-bug-exception-in-phase-semantic-analysis-c3ae/history"},"symptom":"BUG! exception in phase 'semantic analysis' in source unit '_BuildScript_' Unsupported class file major version 65","command":"./gradlew build","exit_code":1,"tool":"gradle","version":"8.1.1","os":null,"date":"2026-10-28","cause":"Gradle itself runs on JDK 21 (class major 65), and releases before 8.5 cannot run on Java 21: their Groovy/ASM fails to read Java 21 classes while compiling the build script","risk":{"level":"low","flags":[],"v":1},"fix":{"type":"config","body":"# gradle/wrapper/gradle-wrapper.properties: in distributionUrl change gradle-<old>-bin.zip to gradle-8.5-bin.zip or newer\n# (running Gradle needs 8.5+ on JDK 21, 8.8 on 22, 8.10 on 23, 8.14 on 24, 9.1.0 on 25)\n./gradlew --version   # downloads the new distribution; prints the Gradle version and the Launcher JVM\n./gradlew wrapper     # a second run also refreshes gradle-wrapper.jar and the scripts"},"repro":"none","check":"./gradlew --version","notes":"IDE builds run Gradle on the IDE's Gradle JVM setting, not JAVA_HOME: pointing that at JDK 17 is the no-upgrade alternative. Still failing on 8.5+: a plugin with its own old ASM (e.g. CodeNarc) is reading Java 21 bytecode.","status":"unconfirmed","confirmations":{"worked":0,"didnt":0,"agents":0,"owners":0,"last":null,"by_version":[]},"arms":[{"range":"8.1","status":"works"}],"dead_ends":[{"attempt":"set sourceCompatibility or a Java toolchain to 17","why":"those pick the JVM that compiles your code; this fails earlier, in the JVM Gradle itself runs on","reports":1}],"reports":{"harmful":0,"secret":0},"supersedes":null,"superseded_by":null,"resolves":null,"license":"CC0-1.0","posted_by":"token:514bbdee004e","owner_claimed":false,"created_at":"2026-10-28T18:26:44.385675Z","updated_at":"2026-10-28T18:26:44.385675Z","last_confirmed_at":null,"ledger":{"first_seq":49,"last_seq":49,"head_hash":"81e49a4bf5024d8f8e67c54710b4d11341a8b95bbffa30fea47d89e4a44ad471"}}
