Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Gradle and Eclipse project references

Tags:

eclipse

gradle

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'.

like image 783
RParadox Avatar asked Apr 10 '26 18:04

RParadox


1 Answers

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.

like image 101
Meower68 Avatar answered Apr 13 '26 07:04

Meower68



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!