Closed wilkinsona closed 9 months ago
Thanks for raising this. The problem is that the regular expression to extract the major version also matches the old version format and then returns 22
. We should probably refine getMajorJDKVersion
so that is also matches the old version scheme correct. For the following, for example, it should return 17
:
~/.sdkman/candidates/java/22.3.2.r17-nik/bin/native-image --version
GraalVM 22.3.2 Java 17 CE (Java Version 17.0.7+7-LTS)
Describe the bug
Upgrading the NBT plugin to 0.9.26 or 0.9.27 causes a project that previously built successfully to fail due to
--color
being an unrecognised option:I think the problem was introduced by https://github.com/graalvm/native-build-tools/commit/c02c2053175b351ad2ec2acd8d037b82900b31e5.
To Reproduce
Run the
nativeCompile
task in a Gradle project using NBT 0.9.26 or .27.Expected behavior
--color
is not added to the command line options of anative-image
binary that does not support it.