On 22/11/05 9:09 PM, Scott Palmer wrote:
Somewhat related to the issue described already…
My project wants to use JDK 19 features.
Gradle 7.5.1 wants to run on something older, e.g. JDK 17.
I had a similar issue, the IDE used the wrong source version. The
problem was fixed, in my case, by explicitly setting the --source or
--release in compiler args and a PR that uses compiler args to override. See
https://github.com/apache/netbeans/issues/4704
and the associated patch. Perhaps there's a solution for you in there.
-ernie
I use a java toolchain specification in the Gradle script so Gradle will
happily build with JDK 19 while it runs the Gradle daemon on JDK 17.
However, for NetBeans to allow JDK 19 features in the editor, I need to tell it
in the project settings…
In Project Properties, the “Sources” section has a Source/Binary format field that
is read-only. I have to change under Build->Compile the JDK.
It then tries to set JAVA_HOME to JDK19 when invoking Gradle builds and Gradle
7.5.1 is not happy.
Is it possible for the Gradle plugin to figure out the Java toolchain version
that Gradle will use in order to set the source compatibility level of the
editor?
Scott
On Nov 5, 2022, at 6:12 AM, Svata Dedic<[email protected]> wrote:
It would greatly help to also supply a minimal build.gradle that triggers the
failure: I've tried to load several of my gradle samples using JDK19 seemingly
without any issues.
The printed type/method seems as my changes to gradle loading are the culprit:
based on the sample I'll be probably able to wrap the internal API calls into
better guards.
Please run the IDE with the following on the commandline:
-J-Dorg.netbeans.modules.gradle.loaders.LegacyProjectLoader.level=400
that should print (a ton of !) additional gradle-nb communication to the log,
possibly including the real exception thrown in the daemon.
-Svata
On 05. 11. 22 8:26, Laszlo Kishalmi wrote:
Reverting back to Java 17 or 18 as IDE runtime would be a solution. Though it
seems this time we reached too deep into the Gradle internals an got burned.
That means you've found a real bug. Would you report it on github? We might be
able to do an RC4 for NB-16. Though it is possible that it would be NB-17.
[...]
On 11/4/22 21:04, Scott Palmer wrote:
When I edited netbeans.conf to force NB to run with JDK 17, my project that
uses Gradle 7.6-rc-1 via the Gradle wrapper and JDK 19 (via Gradle Java
Toolchain support) still claimed that it would not load. The only error
message shown is:
'boolean
org.gradle.api.internal.provider.ValueSupplier$ExecutionTimeVaue.isFixedValue()’
I had the Gradle settings in NB set to use that fixed path for Gradle and
ignore my wrapper settings. It is the path to my Gradle 7.6-RC-1 install,
though I don’t need it to be 7.6 to run the Gradle script..
---------------------------------------------------------------------
To unsubscribe, e-mail:[email protected]
For additional commands, e-mail:[email protected]
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
---------------------------------------------------------------------
To unsubscribe, e-mail:[email protected]
For additional commands, e-mail:[email protected]
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists