Skip to content

build: set the native-image javaLauncher with Property.set [NOTASK] - #1291

Merged
munishchouhan merged 1 commit into
masterfrom
fix-native-javalauncher-set
Nov 19, 2026
Merged

munishchouhan merged 1 commit into
masterfrom
fix-native-javalauncher-set

Conversation

@munishchouhan

Copy link
Copy Markdown
Member

What

Set the native-image javaLauncher with Property.set(...) instead of the Groovy javaLauncher = ... assignment.

Why

The Groovy assignment form fails at configuration time on native-build-tools 1.x:

BaseNativeImageOptions_Decorated.setJavaLauncher(Unknown Source)
  > class jdk.proxy1.$Proxy101 cannot be cast to
    org.gradle.api.internal.provider.support.LazyGroovySupport
  at wave-cli/app/build.gradle:109

In 1.x getJavaLauncher() returns a dynamic proxy rather than a plain Gradle Property — added by native-build-tools#845 to distinguish an explicitly configured launcher from a convention one. Gradle's generated setter for the = sugar casts the receiver to LazyGroovySupport, which the proxy does not implement. Known upstream bug, still open: native-build-tools#1071.

.set(...) is valid on the current 0.11.5 as well, so this is a no-op for today's build and unblocks the plugin bump in #1278 (Renovate will rebase that PR once this lands). Not "closes" — #1278 does the bump itself.

Verification

  • With this diff on 0.11.5: ./gradlew check passes; the app:nativeCompile task graph configures.
  • The .set(...) form was additionally exercised end to end on both 0.11.5 and 1.1.18 locally — native image builds, and wave --version / --help / --dry-run -i alpine -o json all work — but only with the toolchain vendor spec relaxed to GraalVM CE, since Oracle GraalVM is not installed on that machine.
  • The authoritative check is this PR's own Wave-cli builds run, which compiles the native binary with Oracle GraalVM 25 on all five matrix entries (incl. the static musl linux-x86_64 build and the embedded trust store check).

🤖 Generated with Claude Code

The Groovy `javaLauncher = ...` assignment fails on native-build-tools 1.x:
the generated setter casts the launcher property to LazyGroovySupport, and
1.x returns a dynamic proxy that does not implement it. `.set(...)` works on
both the current 0.11.5 and 1.x, so this unblocks the plugin bump without
changing behaviour today.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@munishchouhan
munishchouhan requested review from a team and pditommaso as code owners November 18, 2026 21:13
@munishchouhan
munishchouhan merged commit 1336637 into master Nov 19, 2026
20 checks passed
@munishchouhan
munishchouhan deleted the fix-native-javalauncher-set branch November 19, 2026 09:17
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.

2 participants