Reputation: 6222
I have roughly this project structure in eclipse:
rootproj
---settings.gradle
---build.gradle
eclipseProject
---folderA
------build.gradle
---folderB
------build.gradle
I declare folderA and folderB as gradle projects in settings.gradle. folderA and folderB have a src/main/java with src files in them
Is there any way, in eclipse, I can right click on 'eclipseProject->gradle->refresh dependencies' and have folderA's and folderB's dependencies downloaded and added to 'eclipseProject's "Gradle Dependencies" folder?
Upvotes: 0
Views: 1744
Reputation: 6222
This is the way I did it:
First, I needed to to make eclipseProject
a gradle project by adding it to settings.gradle. Then I needed to add a build.gradle
file to eclipseProject
. And then in the build.gradle
file in eclipseProject
, I had to add these lines to configure the .classpath file that gets automatically generated when I right click eclipseProject->gradle->refresh dependencies
:
eclipse.classpath.plusConfigurations += [
project(':folderA').configurations.compile,
project(':folderB').configurations.compile
]
Upvotes: 0
Reputation: 825
Do you import the projects individually or do you import the root project? Import the root project and you will get the sub projects listed individually.
Upvotes: 1