Reputation: 3215
I would like to know if there is a property that returns a SourceSet full path string or file directory, something like ${project.projectDir}/src/${sourceSet.name}
.
apply plugin: 'java'
sourceSets {
foo {
java {
srcDir 'example/dir/java'
}
}
}
// For example, this could return pathToProject/src/example/dir
println sourceSets.foo.srcDir
Upvotes: 4
Views: 4543
Reputation: 46
Try this:
productFlavors {
admin { }
customer { }
}
sourceSets {
main {
java.srcDirs = ['src/main']
//other typical sourceSets stuff
}
admin.java.srcDirs = ['src/admin']
customer.java.srcDirs = ['src/customer']
}
Upvotes: 2