I have just opened this (https://github.com/codetojoy/easter_eggs_for_gradle/tree/master/egg_StackOverflow_51685286) project in IntelliJ with the following files:
src/net/codetojoy/Foo.java
src/net/codetojoy/service/FooService.java
src/net/codetojoy/tests/FooServiceTestCase.java
and build.gradle
contains a configuration for sourceSets like so:
sourceSets {
main {
java {
srcDir 'src'
exclude 'net/codetojoy/tests/*'
}
}
}
sourceSets.test.java.srcDir 'src/net/codetojoy/tests'
and On the FooServiceTestCase.java
file, I am getting an error on the package line saying Package name 'net.codetojoy.tests' does not correspond to the file path
.
I think it is because of the customised source and test set. But I am unsure how to fix it....
please help