Skip to content

fix: install and require JDK 17 for Android builds - #76

Merged
twistedmelonman merged 2 commits into
mainfrom
claude/fix-temurin-17-manifest
Oct 19, 2026
Merged

twistedmelonman merged 2 commits into
mainfrom
claude/fix-temurin-17-manifest

Conversation

@twistedmelonman

Copy link
Copy Markdown
Member

The unversioned temurin cask now installs JDK 27. React Native Android builds need JDK 17 installed, so a fresh build host set up from this manifest can't build kebab-tax.

  • config/casks.txt, SPEC.md: temurin → temurin@17.
  • app-setup/android-setup.sh: check for JDK 17 with java_home --failfast -v 17 instead of command -v java, which passed on a host with only JDK 27.

Why 17 specifically, verified on MIMOLETTE (RN 0.86.3, Expo 57, AGP 8.12.0):

  • RN's Gradle plugin (JdkConfiguratorUtils.kt) sets jvmToolchain(17) on every Android module, and Expo pins KSP to 17. With JDK 17 hidden from Gradle the build fails at :app:compileDebugJavaWithJavac: "Cannot find a Java installation … matching: {languageVersion=17}".
  • A newer JDK as the Gradle runtime doesn't help past 23. On JDK 25, Prefab's bundled JNA calls System::load, the JDK prints the JEP 472 restricted-method warning to stderr, and AGP's GeneratePrefabPackages.reportErrors treats any Prefab stderr line as fatal. JDK 21 runs Gradle fine, but compilation still uses 17.

Not changed: SPEC.md's component table still says "Azul Zulu or Temurin", which is still true; any vendor's 17 works.

Claude Code Bot added 2 commits October 19, 2026 14:40
The unversioned temurin cask now installs JDK 27. React Native's Gradle
plugin sets jvmToolchain(17) on every Android module, and Expo pins KSP
to 17, so a build host without JDK 17 fails at compileDebugJavaWithJavac.
Newer JDKs do not substitute: on 24+, Prefab's JNA call prints a JEP 472
warning that AGP 8.12 treats as a fatal error.

Verified on MIMOLETTE with RN 0.86.3 / Expo 57 / AGP 8.12.0.
`command -v java` passes on a host that has only JDK 27, which then
fails later at compileDebugJavaWithJavac. Check with
`java_home --failfast -v 17` instead; --failfast makes java_home exit
non-zero when 17 is absent rather than returning the newest JDK.
@twistedmelonman
twistedmelonman merged commit 1ddf67b into main Oct 19, 2026
2 checks passed
@twistedmelonman
twistedmelonman deleted the claude/fix-temurin-17-manifest branch October 19, 2026 21:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant