[ 
https://issues.apache.org/jira/browse/NETBEANS-5141?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17288826#comment-17288826
 ] 

Antonio Marques commented on NETBEANS-5141:
-------------------------------------------

OK, your proposal seems to work. Moreover, the user's gradle.properties file is 
even show in each project's tree, which allows easy checking/editing.

I haven't found a way to add *-x test* (being on macOS, using *GRADLE_OPTS* is 
more work than it's worth), but I added 
{code:groovy}
test.onlyIf { gradle.startParameter.taskNames.contains('test') }
{code} 
to *build.gradle*. I do have the option checked in the Preferences, but it 
doesn't seem to translate to every project in a build chain.

Now I'll pose an offtopic question, lest I go open a dumb issue (I did search 
for this, but no luck so far): In a number of projects, we have sources outside 
the project root, and we've always included them thus:
{code:groovy}
sourceSets {
    main {
        java {
            srcDirs 'src/main/java'
            srcDirs '../websockets/src/main/java'
            ...
{code}

Now, it happens that the plugin seems to ignore those sources. Not, however, 
during the build phase, the project builds fine, but the external source dirs 
don't appear in the project navigation AND the classes in them aren't picked up 
by dependent projects. (I should point out that the dependent projects are 
setup independently, not as a gradle nested project; they include the main 
project via *includeBuild*). Again, the dependent projects build OK, but the 
IDE complains all over about the 'missing' classes. The only place those 
external sources are shown is in the project properties dialog.
Many years ago I had a similar problem with external sources and had to end up 
using Eclipse(!). It was nothing gradle-related, of course.

> Support custom global gradle arguments and gradle JVM arguments
> ---------------------------------------------------------------
>
>                 Key: NETBEANS-5141
>                 URL: https://issues.apache.org/jira/browse/NETBEANS-5141
>             Project: NetBeans
>          Issue Type: New Feature
>          Components: projects - Gradle
>            Reporter: Antonio Marques
>            Assignee: Laszlo Kishalmi
>            Priority: Major
>
> In the Kelemen plugin ([https://github.com/kelemen/netbeans-gradle-project)] 
> it is possible to set global arguments to add to the gradle command line, as 
> well as to the gradle JVM command line (Preferences \ Miscellaneous \ Gradle 
> \ Scripts and Tasks). This is essential if your build scripts respond to 
> custom parameters that you don't want to replicate across every specific 
> project. The Kelemen plugin uses two textareas, of line-separated options. I 
> don't see such a feature in the current implementation, though there are 
> places in the Preferences where it could be placed.
> This may only be useful for some, but for those of us for whom it is useful, 
> it's essential. Until it's in place, our only option is to keep using the 
> Kelemen plugin (which I have nothing against, but there must be a reason why 
> there's s separate implementation on NB).



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
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