You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@netbeans.apache.org by "Laszlo Kishalmi (Jira)" <ji...@apache.org> on 2020/04/06 14:29:00 UTC

[jira] [Commented] (NETBEANS-4126) Tasks on Sub-projects of a Gradle build are invoked by changing to the sub-project directory first, this can change the project hierarchy

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

Laszlo Kishalmi commented on NETBEANS-4126:
-------------------------------------------

Well, I think that kind of Gradle usage, multi project setup, with separate settings.gradle, is an anti-pattern.

Changing directory into a sub-project was, AFAIK, required to have the configure on demand work correctly at least the early days. I have to check what is it's status now.

So my first question, why would you have the need for such a setup?

> Tasks on Sub-projects of a Gradle build are invoked by changing to the sub-project directory first, this can change the project hierarchy
> -----------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: NETBEANS-4126
>                 URL: https://issues.apache.org/jira/browse/NETBEANS-4126
>             Project: NetBeans
>          Issue Type: Bug
>          Components: projects - Gradle
>    Affects Versions: 11.3
>         Environment: macOS 10.15.4
> Gradle 6.3
> NetBeans 11.3 running on JDK-14
> Project configured to compile with JDK-8
>            Reporter: Scott Palmer
>            Assignee: Laszlo Kishalmi
>            Priority: Major
>
> I have a multi-project Gradle project with a parent project and several sub-projects.  However, in the sub-project folders I have a settings.gradle file, so if gradle is invoked from within the sub-folder the sub-project behaves as a root project.  This is intentional.
> When I open the parent project in NetBeans, the sub-projects are correctly identified as belong to the parent project, but when build actions are done on them the gradle command is invoked from the sub-folder, e.g.:
> JAVA_HOME="/Library/Java/JavaVirtualMachines/jdk1.8.0_202.jdk/Contents/Home"
> cd /Users/scott/dev/Kayak/MyParentProject/MySubProject; /Users/scott/dev/gradle/bin/gradle --configure-on-demand -x check build
> Instead the build target should be augmented with the project path:
> JAVA_HOME="/Library/Java/JavaVirtualMachines/jdk1.8.0_202.jdk/Contents/Home"
> cd /Users/scott/dev/Kayak/MyParentProject; /Users/scott/dev/gradle/bin/gradle --configure-on-demand -x check :MySubProject:build



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

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@netbeans.apache.org
For additional commands, e-mail: commits-help@netbeans.apache.org

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