One eclipse project view over two multi-module gradle projects


(david koch) #1

Hello, I’ve two multi-module projects common and app with different release cycles. App modules depend on common modules. When creating the eclipse projects for app the common libs are referenced in eclipse as external modules as expected.

Nevertheless usually in eclipse I need a consistent view over all modules of both projects so changes in one of the common modules should take effect in the appropriate app modules.

With maven I did it by placing both projects into one base directory and creating an artificial pom with all modules specified that needs wiring for eclipse projects.

Is there something similar to tell gradle which projects to wire up for eclipse? Thanks david


(Peter Niederwieser) #2

You can create an uber-build that consists of a ‘settings.gradle’ that lists all ‘app’ and ‘common’ projects, and a ‘build.gradle’ that applies the ‘eclipse’ plugin to all projects. The projects can be located anywhere, as long as you configure their location in the uber-build’s ‘settings.gradle’. Running ‘gradle eclipse’ for the uber-build should then have the desired effect.