I hava an example java project package
package com.example.testing;
with such file tree
app
|
src->com->example->testing->Main
I have a slightly different approach with a Gradle 4.6:
sourceSets {
main {
java {
srcDir 'src/main/java'
srcDir 'build/swagger-code-dummy/src/main/java'
}
}
}
as you can see, I had to specify the directories with the "/main/java" subdirectories as well, otherwise gradle/intellij was not setting the right path.
Maybe this helps someone else too :)