I have the following structure in my project directory:
Is there a way to tell gradle to look in any folder that matches "src/main/java" for the source directories? I'm trying the following, but it doesn't work:
sourceSets {
main {
java {
srcDir '**/src/main/java'
}
}
}
Whilst this is completely whacky, you can likely use a FileTree
for this.
sourceSets {
main {
java {
srcDirs fileTree(projectDir).matching {
include '**/src/main/java'
}
}
}
}
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.