hey all, we're trying to build our project (spring...
# community-support
g
hey all, we're trying to build our project (springboot+kotlin backend) with gradle 8.14 using JDK24 (amazon corretto). we consistently get warnings about the use of restricted methods:
Copy code
$ ./gradlew clean                   
WARNING: A restricted method in java.lang.System has been called
WARNING: java.lang.System::load has been called by net.rubygrapefruit.platform.internal.NativeLibraryLoader in an unnamed module (file:/Users/gvermeiren/.gradle/wrapper/dists/gradle-8.14-bin/38aieal9i53h9rfe7vjup95b9/gradle-8.14/lib/native-platform-0.22-milestone-28.jar)
WARNING: Use --enable-native-access=ALL-UNNAMED to avoid a warning for callers in this module
WARNING: Restricted methods will be blocked in a future release unless native access is enabled
I've looked in the github issues, but all related issues look closed/solved. An yet ⬆️ Any ideas on what is going on?
v
You need to update the wrapper
🙌 1
g
well.. the wrapper is at 8.14-bin
Copy code
distributionUrl=https\://services.gradle.org/distributions/gradle-8.14-bin.zip
is there a more recent version?
ooh waaw.. I used the gradle wrapper task to upgrade again,... and now it works 🙂 thanks for nudging me in doing that again \m/
v
That was not the wrapper, that was the distribution to use.
The wrapper is the 4 files you have committed, in this case specifically the
gradle-wrapper.jar
file
Calling the
wrapper
task updates the 4 files from the currently used version, specifying a
--gradle-version
just controls which version is written to the properties file for the Gradle distribution used starting with the next run.
Executing the
wrapper
task again updates the 4 files then from the new version, updating the actual wrapper.
g
that's enlightening.. TIL thanks again
👌 1