RParadox
RParadox

Reputation: 6851

Gradle and Eclipse project references

I'm using Gradle with Eclipse and am trying to reference Project1 from Project2 (both under the same root directory), like so:

settings.gradle:

include ':Project1'
project(':Project1').projectDir = new File(settingsDir, '../Project1')

build.gradle

dependencies {
    compile project(':Project1')
 ...}

Project1 is also referenced through the build path. But eclipse/gradle does not recompile and instead uses include the old jar classes. I've also tried to set the plugin to apply plugin: 'eclipse-wtp'.

Upvotes: 3

Views: 1706

Answers (1)

Meower68
Meower68

Reputation: 1009

Just out of curiosity, do you have a block like this somewhere in your build.gradle

eclipse.project {
  referencedProjects 'Project1'
}

I ask because, if you don't tell Eclipse that this project references Project1, it won't be included in the build path.

Upvotes: 1

Related Questions