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?

Not 100% sure, but just an idea.

Gj


On Mon, 20 May 2019 at 11:47, Arunava Sinha <[email protected]>
wrote:

> Hi,
>
> I tried org.gradle.jvmargs=--enable-preview. It didn't worked.
>
> Considering the scenarios as there and n number of ways to specify jvm
> parms for compilation/run and also currently support is not present to
> read/write gradle configuration from the plugin. I would choose to not
> provide the hint in gradle project.
>
> Regards,
>
> Arunava Sinha
>
> On 5/19/2019 7:05 PM, Eric Bresie wrote:
> > How is what’s being discussed different from a “gradle template” type
> scenario?
> >
> > That said, where in the code are the “hints API” locates? Where does a
> given hint get it’s possible options?
> >
> > As I understand Gradle, it’s a flavor of groovy coding with some DSL
> build specifics for the Gradle domain?
> >
> > In the end would this be a mixture of groovy with addition domain
> specific tips/hints?
> >
> > Eric Bresie
> > [email protected]
> >> On May 19, 2019 at 2:20:34 AM CDT, Antonio <[email protected]> wrote:
> >> Hi,
> >>
> >> What about adding (or requesting to add)
> >>
> >> org.gradle.jvmargs=--enable-preview
> >>
> >> inside gradle.settings? Would that do?
> >>
> >> Cheers,
> >> Antonio
> >>
> >> El 19/5/19 a las 8:16, Laszlo Kishalmi escribió:
> >>> I'm replying through the dev mailing list as others could help and/or
> >>> comment that way.
> >>>
> >>> In my personal point of view as Gradle build scripts are read-only. The
> >>> are wide variety of those files out there.
> >>>
> >>> An editor hint might work. Though detecting if the given compiler arg
> is
> >>> set for a source set may require support from the plugin and the
> >>> generated additional code might not work at all.
> >>>
> >>> On 5/15/19 6:20 AM, Arunava Sinha wrote:
> >>>> Hi laszlo,
> >>>>
> >>>> I am working on below issue to enable preview feature in java
> >>>> projects.(Planned to support for ant/maven/gradle projects).
> >>>>
> https://urldefense.proofpoint.com/v2/url?u=https-3A__issues.apache.org_jira_browse_NETBEANS-2D2457&d=DwIFaQ&c=RoP1YumCXCgaWHvlZYR8PZh8Bv7qIrMUB65eapI_JnE&r=0iEQnHhKGriSNkCA1-Ki6rDkb-drwubOsNfMCo_m5Ck&m=TcOkMvLD7qc02lagR7KuBiLDeNKXztf_6Bvny3re7l4&s=x0CMWxWnIBHkx3QOtpL0PEqyCThBrNx-142YfHmhrt0&e=
> >>>>
> >>>> Hints will add below parameters in build.gradle file to enable
> preview.
> >>>>
> >>>> compileJava {
> >>>> options.compilerArgs =['--enable-preview']
> >>>> }
> >>>> run{
> >>>> jvmArgs(['--enable-preview'])
> >>>> }
> >>>>
> >>>>
> >>>> I am not able to find and utility/model class to read and write into
> >>>> build.gradle. So I am planning to read build.gradle as text file line
> >>>> by line and then will manipulate the lines to add the parameters .
> >>>>
> >>>> I will be using the below APIs
> >>>>
> >>>> java.nio.file.Files.readAllLines(<build.gradle file path>,
> >>>> StandardCharsets.UTF_8);
> >>>> java.nio.file.File.write(<build.gradle file path>, lines,
> >>>> StandardCharsets.UTF_8);
> >>>>
> >>>> Also I found that even if parameters were added in build.gradle, in
> >>>> editor it still shows error for that below fix I am proposing
> >>>>
> >>>>
> https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_arusinha_incubator-2Dnetbeans_pull_3&d=DwIFaQ&c=RoP1YumCXCgaWHvlZYR8PZh8Bv7qIrMUB65eapI_JnE&r=0iEQnHhKGriSNkCA1-Ki6rDkb-drwubOsNfMCo_m5Ck&m=TcOkMvLD7qc02lagR7KuBiLDeNKXztf_6Bvny3re7l4&s=dE0lSzvPoiUK67lxrpK8ta3NErDqV9kpUNWwmsSLlaQ&e=
> >>>>
> >>>> Please let me know is there any better approach to read/write
> >>>> build.gradle file.
> >>>>
> >>>> Regards,
> >>>> Arunava sinha
> >>> ---------------------------------------------------------------------
> >>> To unsubscribe, e-mail: [email protected]
> >>> For additional commands, e-mail: [email protected]
> >>>
> >>> For further information about the NetBeans mailing lists, visit:
> >>>
> https://urldefense.proofpoint.com/v2/url?u=https-3A__cwiki.apache.org_confluence_display_NETBEANS_Mailing-2Blists&d=DwIFaQ&c=RoP1YumCXCgaWHvlZYR8PZh8Bv7qIrMUB65eapI_JnE&r=0iEQnHhKGriSNkCA1-Ki6rDkb-drwubOsNfMCo_m5Ck&m=TcOkMvLD7qc02lagR7KuBiLDeNKXztf_6Bvny3re7l4&s=8kammtOHNs0JsWL8YLvJy35cdaWNoobF4aP6jv22ECE&e=
> >>>
> >>>
> >>>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: [email protected]
> >> For additional commands, e-mail: [email protected]
> >>
> >> For further information about the NetBeans mailing lists, visit:
> >>
> https://urldefense.proofpoint.com/v2/url?u=https-3A__cwiki.apache.org_confluence_display_NETBEANS_Mailing-2Blists&d=DwIFaQ&c=RoP1YumCXCgaWHvlZYR8PZh8Bv7qIrMUB65eapI_JnE&r=0iEQnHhKGriSNkCA1-Ki6rDkb-drwubOsNfMCo_m5Ck&m=TcOkMvLD7qc02lagR7KuBiLDeNKXztf_6Bvny3re7l4&s=8kammtOHNs0JsWL8YLvJy35cdaWNoobF4aP6jv22ECE&e=
> >>
> >>
> >>
>
> ---------------------------------------------------------------------
> 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
>
>
>
>

Reply via email to