You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@netbeans.apache.org by GitBox <gi...@apache.org> on 2021/11/03 10:47:07 UTC

[GitHub] [netbeans] sdedic commented on a change in pull request #3293: [NETBEANS-5846] Minimal support of java-platfom Gradle projects.

sdedic commented on a change in pull request #3293:
URL: https://github.com/apache/netbeans/pull/3293#discussion_r741809596



##########
File path: extide/gradle/netbeans-gradle-tooling/src/main/groovy/org/netbeans/modules/gradle/tooling/NbProjectInfoBuilder.groovy
##########
@@ -341,10 +374,18 @@ class NbProjectInfoBuilder {
         }
         //visibleConfigurations = visibleConfigurations.findAll() { resolvable(it) }
         visibleConfigurations.each() {
-            def componentIds = []
+            def componentIds = new HashSet()
             def unresolvedIds = []
             def projectNames = []
             long time_inspect_conf = System.currentTimeMillis()
+            
+            it.dependencies.withType(ModuleDependency) {
+                def group = it.group != null ? it.group : '';
+                def name = it.name
+                def version = it.version != null ? ':' + it.version : ''
+                def id = group + ':' + name + version;
+                componentIds.add(id)                

Review comment:
       is it OK to pass on malformed component IDs, e.g. no name or no group ?

##########
File path: extide/gradle/src/org/netbeans/modules/gradle/nodes/ConfigurationsNode.java
##########
@@ -134,8 +134,12 @@ public Image getOpenedIcon(int type) {
     })
     @Override
     public String getShortDescription() {
-        GradleProject gp = project.getGradleProject();
-        return gp.getBaseProject().isResolved() ? Bundle.HINT_ConfigurationsNode() : Bundle.HINT_ConfigurationsNodeUnresolved();
+        return !needsResolve() ? Bundle.HINT_ConfigurationsNode() : Bundle.HINT_ConfigurationsNodeUnresolved();
+    }
+
+    private boolean needsResolve() {
+        GradleBaseProject gbp = GradleBaseProject.get(project);
+        return !gbp.isResolved() && !gbp.hasPlugins("java-platform"); //NOI18N

Review comment:
       Hm, this means that if a configuration is NOT resolved , but the project does use `java-platform` plugin - the project  as a whole ceases needing to be resolved ?




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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

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