Deprecate fallback plugin options - #997
Conversation
|
I would test this with Mandrel and Bellsoft distributions. |
|
@vjovanov Thanks for the suggestion. Adding Mandrel and Liberica NIK as permanent CI dimensions would significantly increase the number and cost of CI jobs, so I tested them locally instead. I tested the parser and Maven command invocation against actual installations of:
Mandrel uses I also tested same-format 25.1 variants for all three distributions. Assuming they retain their current output structure, they are recognized as 25.1+ and the plugin-generated An unknown distribution using a different version-output structure remains conservative: it will retain We could avoid the version-specific omission entirely if this approach is considered too heuristic, but then builds using the default disabled-fallback configuration would print the |
|
No need to add to the CI, just test. Excellent! |
What changed
The Gradle
fallbackDSL option and Maven<fallback>parameter are now marked deprecated. Both remain available for compatibility.The plugins now distinguish the GraalVM release from the JDK version reported by
native-image --version:--no-fallback.--no-fallbackflag.--no-fallbackbuild arguments remain unchanged.Why
Native Image removed the fallback feature in GraalVM 25.1, so
--no-fallbackis deprecated and has no effect there. Suppressing the plugin-generated flag avoids a deprecation warning on every build while preserving behavior for older GraalVM releases.Both GraalVM 25.0 and 25.1 use JDK 25, so the existing JDK-major check cannot distinguish them. The implementation reads the first dotted release from a runtime-environment line in the existing
native-image --versionoutput, regardless of the distribution's vendor label, and does not add another version-check process.Example
Existing configurations continue to work while showing the deprecation in API documentation:
nativeImage { fallback = false // deprecated on GraalVM 25.1+ }Implementation summary
--no-fallbackon confirmed GraalVM 25.1+ releases in both plugins.Validation
grund checkgrund fmt . --marker --cross-refs --check./gradlew :utils:check./gradlew :native-gradle-plugin:inspections :native-maven-plugin:inspections :utils:checkgit diff --checkNativeExtensionTestfailure because this environment lacks a Spock class-mocking backend. The changed Maven tests and module inspections passed.Fixes #991