Android release pipeline: Gradle assembleDebug fails on JvmVendorSpec.IBM_SEMERU — foojay-resolver-convention 0.5.0 incompatible with Gradle 9 #278

Closed
opened 2026-06-24 13:29:43 +00:00 by james · 0 comments
Owner

Symptom

release-android.yml (run #701) fails at the Gradle assembleDebug (no signing secrets) step with:

FAILURE: Build failed with an exception.

* What went wrong:
Class org.gradle.jvm.toolchain.JvmVendorSpec does not have member field 'org.gradle.jvm.toolchain.JvmVendorSpec IBM_SEMERU'

BUILD FAILED in 52s

Gradle wrapper downloaded gradle-9.3.1-bin.zip (the version that ships in expo/template.tgz for Expo SDK 56 → RN 0.85.3), JDK 21 was on PATH, prebuild finished cleanly, then the build blew up in the configuration phase before any task ran.

Root cause

@react-native/gradle-plugin@0.85.3 (matching our react-native@0.85.3 pin) ships settings.gradle.kts with:

plugins { id("org.gradle.toolchains.foojay-resolver-convention").version("0.5.0") }

foojay-resolver-convention 0.5.0 references JvmVendorSpec.IBM_SEMERU. That field was deprecated in Gradle 8.8 and removed in Gradle 9.0 (IBM rebranded Semeru → IBM JDK). The Gradle 9.3.1 wrapper RN ships with no longer exposes the field, so any Gradle configuration that references it fails with the error above.

The project's settings.gradle (from expo/template.tgz) does includeBuild(reactNativeGradlePlugin), which means the gradle-plugin's own settings.gradle.kts is processed by the same Gradle 9.3.1 instance — and that's where IBM_SEMERU dies.

Upstream RN already fixed this in @react-native/gradle-plugin@0.86.0 by bumping foojay to 1.0.0. The fix didn't backport to the 0.85.x line.

Workflow + lines

  • .forgejo/workflows/release-android.yml lines 209-212: the failing step (./gradlew --no-daemon :app:assembleDebug)
  • The actual failing artifact is node_modules/@react-native/gradle-plugin/settings.gradle.kts line 16 in react-native@0.85.3's gradle-plugin shipped inside the pnpm store. Not a file we own.

Fix shape

Apply a pnpm patch against @react-native/gradle-plugin@0.85.3 that bumps foojay-resolver-convention from 0.5.0 to 1.0.0 — exactly the change upstream RN made in 0.86.0. One-line patch in patches/, registered in root package.json under pnpm.patchedDependencies. CI's pnpm install --frozen-lockfile will apply it on every run.

Acceptance

The next release-tag push reaches the Gradle assembleRelease + bundleRelease (or assembleDebug) step and either succeeds or fails at a later, unrelated stage. The IBM_SEMERU error is gone.

Out of scope

Bumping RN itself (0.85.3 → 0.86.x) — that's a much bigger lift and not what's blocking the release build today.

## Symptom `release-android.yml` (run [#701](https://forge.wynning.tech/james/carol/actions/runs/701)) fails at the *Gradle assembleDebug (no signing secrets)* step with: ``` FAILURE: Build failed with an exception. * What went wrong: Class org.gradle.jvm.toolchain.JvmVendorSpec does not have member field 'org.gradle.jvm.toolchain.JvmVendorSpec IBM_SEMERU' BUILD FAILED in 52s ``` Gradle wrapper downloaded `gradle-9.3.1-bin.zip` (the version that ships in `expo/template.tgz` for Expo SDK 56 → RN 0.85.3), JDK 21 was on PATH, prebuild finished cleanly, then the build blew up in the configuration phase before any task ran. ## Root cause `@react-native/gradle-plugin@0.85.3` (matching our `react-native@0.85.3` pin) ships `settings.gradle.kts` with: ```kotlin plugins { id("org.gradle.toolchains.foojay-resolver-convention").version("0.5.0") } ``` foojay-resolver-convention 0.5.0 references `JvmVendorSpec.IBM_SEMERU`. That field was **deprecated in Gradle 8.8 and removed in Gradle 9.0** (IBM rebranded Semeru → IBM JDK). The Gradle 9.3.1 wrapper RN ships with no longer exposes the field, so any Gradle configuration that references it fails with the error above. The project's `settings.gradle` (from `expo/template.tgz`) does `includeBuild(reactNativeGradlePlugin)`, which means the gradle-plugin's own `settings.gradle.kts` is processed by the same Gradle 9.3.1 instance — and that's where IBM_SEMERU dies. Upstream RN already fixed this in `@react-native/gradle-plugin@0.86.0` by bumping foojay to `1.0.0`. The fix didn't backport to the 0.85.x line. ## Workflow + lines - `.forgejo/workflows/release-android.yml` lines 209-212: the failing step (`./gradlew --no-daemon :app:assembleDebug`) - The actual failing artifact is `node_modules/@react-native/gradle-plugin/settings.gradle.kts` line 16 in `react-native@0.85.3`'s gradle-plugin shipped inside the pnpm store. Not a file we own. ## Fix shape Apply a `pnpm patch` against `@react-native/gradle-plugin@0.85.3` that bumps `foojay-resolver-convention` from `0.5.0` to `1.0.0` — exactly the change upstream RN made in 0.86.0. One-line patch in `patches/`, registered in root `package.json` under `pnpm.patchedDependencies`. CI's `pnpm install --frozen-lockfile` will apply it on every run. ## Acceptance The next release-tag push reaches the `Gradle assembleRelease + bundleRelease` (or `assembleDebug`) step and either succeeds or fails at a later, unrelated stage. The IBM_SEMERU error is gone. ## Out of scope Bumping RN itself (0.85.3 → 0.86.x) — that's a much bigger lift and not what's blocking the release build today.
james closed this issue 2026-06-24 13:51:06 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
james/carol#278
No description provided.