-
Notifications
You must be signed in to change notification settings - Fork 80
Description
Before reporting
- This repository should be used to report issues on the Maven or Gradle plugins for GraalVM.
- Please report issues which are specific to the Spring Framework or the Micronaut framework to their specific repositories.
- Do not report issues with building your specific application, e.g errors which happen at image build time like classes initialized at build time, or missing classes as run time: those are not related to the plugins but problems with configuration. You can refer to the GraalVM native image documentation for available options and the plugins documentation for how to use them with the plugin.
Describe the bug
A clear and concise description of what the bug is.
Make sure that you have read the documentation and that you are using the latest plugin version.
Gradle plugin seems to be incompatible with GraalVM JDK 21. When attempting to run the :nativeCompile task, it fails with the following error:
Determining GraalVM installation failed with message: 'gu.cmd' at 'C:\Users\xxxxxx\.jdks\graalvm-jdk-21.0.2+13.1\bin\gu.cmd' tool wasn't found. This probably means that JDK at isn't a GraalVM distribution.
I believe this is because as of GraalVM 21, the gu (which is the Graal Updater?) is no longer included with the GraalVM.
I apologise if it's already known that the plugin isn't compatible with GraalVM 21 and there are plans to fix this; I didn't see anything to that effect when searching through the existing issues, or reading the documentation.
To Reproduce
When possible, provide a link to a repository which reproduces the issue, with instructions on how to use.
The reproducer must make use of either the Maven or Gradle plugin.
Steps to reproduce the behavior:
plugins {
kotlin("jvm") version "1.9.23"
application
jacoco
id("org.graalvm.buildtools.native") version "0.10.1"
}$ .\gradlew.bat nativeCompilePlease use backticks to properly format code.
If possible please attach a complete reproducer here (either as a zip file or as a link to public repository/branch).
Expected behavior
Expected that the code would be compiled into a native binary.
Logs
Add logs to help explain your problem.
Please use backticks to properly format big logs. Example:
```
PS F:\development\rcpd-service> .\gradlew.bat nativeCompile
Welcome to Gradle 8.5!
Here are the highlights of this release:
- Support for running on Java 21
- Faster first use with Kotlin DSL
- Improved error and warning messages
For more details see https://docs.gradle.org/8.5/release-notes.html
Starting a Gradle Daemon, 2 incompatible and 1 stopped Daemons could not be reused, use --status for details
Path for java installation 'C:\Users\xxxxxxxxx\.jdks\graalvm-jdk-21.0.2+13.1' (IntelliJ IDEA) does not contain a java executable
> Task :nativeCompile FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':nativeCompile'.
> Determining GraalVM installation failed with message: 'gu.cmd' at 'C:\Users\xxxxxxxxx\.jdks\graalvm-jdk-21.0.2+13.1\bin\gu.cmd' tool wasn't found. This probably means that JDK at isn't a GraalVM distribution.
Make sure to declare the GRAALVM_HOME environment variable or install GraalVM with native-image in a standard location recognized by Gradle Java toolchain support
* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.
> Get more help at https://help.gradle.org.
BUILD FAILED in 9s
6 actionable tasks: 4 executed, 2 up-to-date
```
System Info (please complete the following information):
- OS: Windows 10
- GraalVM Version: 21.0.2+ 13.1
- Java Version: 21
- Plugin version:
org.graalvm.buildtools.native:0.10.1
Additional context
Add any other context about the problem here.