Well,

In Gradle you need to add the '--enable-preview' jvm arg to multiple places in Gradle (compiler, test runner, and the Java Exec itself). The most elegant way doing that is adding a plugin to the Gradle project which takes care of the internals.

The plugin can be a public one (I'd probably go that way) or just can leave in our repo next to those plugins which makes our run/test single actions possible by extending the Gradle build process (Gradle Project Properties > Build > Compile > Augmented Build Execution)

So I guess it could be a feature under Augmented build, that we could add "enable-preview" and merely alter Gradle execution. The real drawback of altering the build that the experience from building the project from the IDE would be different than from the command line. (So some link with details shall be put in the IDE to a Wiki page.)

So in summary:

 * There is no perfect solution for this.
 * Hint and change several lines in a gradle file is not a real option
 * Put the logic as a Gradle Plugin is preferred
 * We have a way to inject that plugin into a Gradle build
 * The users needs to be properly informed what exactly happens under
   the hood.


On 5/20/19 4:09 AM, Geertjan Wielenga wrote:
Not sure either, but if there’s no way (Laszlo might be able to advise
here) to set “enable-preview” on project level, then global (at least as a
fallback) would seem to be the only way to go.

Gj


On Mon, 20 May 2019 at 12:24, Neil C Smith <neilcsm...@apache.org> wrote:

On Mon, 20 May 2019 at 11:12, Geertjan Wielenga <geert...@apache.org>
wrote:
Maybe read “enable-preview” as a fallback in netbeans.conf? I.e., if not
set anywhere else, check in netbeans.conf for -J-Denable-preview and, if
present, apply to all Java projects, which would include Gradle projects?
If you really wanted it as a global property (not sure!), maybe
somewhere in build.properties as a key related to the chosen Java
platform?  eg. platforms.JDK_12.enable-preview=true

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