wrprice commented on code in PR #8797: URL: https://github.com/apache/netbeans/pull/8797#discussion_r2328889597
########## extide/gradle/netbeans-gradle-tooling/src/main/java/org/netbeans/modules/gradle/tooling/NbProjectInfoBuilder.java: ########## @@ -1562,6 +1563,23 @@ private void detectDependencies(NbProjectInfoModel model) { boolean ignoreUnresolvable = (project.getPlugins().hasPlugin("java-platform") && Boolean.TRUE.equals(getProperty(project, "javaPlatform", "allowDependencies"))); + // https://github.com/apache/netbeans/issues/8764 + Function<ProjectDependency, Project> projDependencyToProject = + sinceGradleOrDefault( + "9.0", + () -> { + Method getPath = ProjectDependency.class.getMethod("getPath"); + return dep -> { + try { + String path = (String) getPath.invoke(dep); + return project.findProject(path); + } catch (ReflectiveOperationException e) { + throw new UnsupportedOperationException(e); + } + }; + }, + () -> ProjectDependency::getDependencyProject); // removed in Gradle 9 Review Comment: Gradle >= 8.11 should have both APIs -- 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-unsubscr...@netbeans.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: notifications-unsubscr...@netbeans.apache.org For additional commands, e-mail: notifications-h...@netbeans.apache.org For further information about the NetBeans mailing lists, visit: https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists