Is it possible for Gradle projects in Eclipse/STS to resolve dependencies to other Gradle projects in the same workspace?

后端 未结 2 1743
野的像风
野的像风 2020-12-03 23:06

A Gradle project in my workspace (call it Downstream) needs to depend on another Gradle project (call it Upstream). Outside of Eclipse, of

相关标签:
2条回答
  • As far as I know these is no such functionality in current STS plugin. Given that there is the re-mapping support to replace dependencies with reference to m2e project I think it should be possible to add it.

    Modifying the generated classpath using XML hooks in EclipseClasspath model descrideb in http://www.gradle.org/docs/current/dsl/org.gradle.plugins.ide.eclipse.model.EclipseClasspath.html will probably not help because this is done in Gradle process where you do not have information about existing Eclipse projects from your current workspace.

    0 讨论(0)
  • 2020-12-03 23:50

    It turns out this is was an outstanding feature request for Gradle IDE. It has been delivered for the 3.6.3 release of Gradle IDE.

    You do have to enable it, though:

    The feature has to be enabled in the Gradle preferences page. Access via "Window >> Preferences >> Gradle".

    If you are not seeing the "remap jars to Gradle projects" there then maybe double check that version of the Gradle plugins is indeed 3.6.3. Maybe something went wrong during the upgrade and you are still using an older version. Source

    0 讨论(0)
提交回复
热议问题