On Mon, 5 Feb 2024 at 17:13, Ernie Rael <err...@raelity.com> wrote:
> I don't get the earlier comment about which gradle version the IDE
> thinks it's using

The current fallback is basically running init on the Gradle version
matching the Tooling API version, then updating the wrapper.

eg.

gradle init (project on 8.4)
gradle wrapper --gradle-version latest (project now on 8.6)

Before the fix in the PR, NetBeans was loading the project between the
init and wrapper stages, rather than after both.  So the IDE "thought"
the project should use 8.4 until the IDE was restarted.

The use of --gradle-version latest was added a few releases ago when
we had an rc version of the
Tooling API, to try and ensure projects were created with a non-rc
Gradle wrapper.  This was hit and miss, as the offline flag (also
fixed in the PR) meant that this only worked if the later Gradle
version had already been downloaded.

The PR fixes both these things.  But we will still update the Tooling
API as well for 21-rc3.  Otherwise new projects without any local
Gradle wrappers available are going to download two Gradle versions.

When there is a Gradle 8.7, or if there's a Gradle 8.6.1, this will
get picked up when creating new projects in future in NB21.

Hopefully by NB22 this can be changed to pass a Gradle version in to
run the init phase, and also to allow choosing alternative versions in
the wizard.  There has been a little discussion on Slack related to
these fixes and that over the last few days.

Both Maven and Gradle UIs would benefit from better support for
configuring and updating the relevant wrappers.

A long answer! :-)  But hopefully makes sense of that comment and the changes.

Best wishes,

Neil

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@netbeans.apache.org
For additional commands, e-mail: dev-h...@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists



Reply via email to