1

I have a java project in gradle where I include sourceSets from another location in addition to sourceSets included in this project. The build and test tasks run all appropiate unittests from both src directories, but the eclipse task is missing sourceSets from one or the other. test sourceset is included from one and the main is the sourceSet from another. How do I make the eclipse task include both sourceSets?

sourceSets {
    main {
        java {
            srcDir '../CommonSource/src/main/java'
        }       
    }
    test {
        java {
            srcDir '../CommonSource/src/test/java'
        }
    }   
}

//I also have the implied src in the current project under the gradle convention src/main/java, and src/main/java.
Girthero
  • 11
  • 1
  • Possible duplicate of [Gradle with Eclipse - incomplete .classpath when multiple sourcesets](https://stackoverflow.com/questions/17047956/gradle-with-eclipse-incomplete-classpath-when-multiple-sourcesets) – Vic Seedoubleyew Feb 14 '18 at 20:33

0 Answers0