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

主宰稳场 提交于 2019-11-27 15:41:41
E-Riz

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

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.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!