I am using Gradle to build my project and compile some protocol buffers using the Gradle Protobuf Plugin. I'd like to build the protos in several directories and exclude a single file.
sourceSets {
main {
java {
srcDirs = [
'src/main/java',
'generated/main/java'
]
}
proto {
srcDirs = [
'foo/proto',
'../bar/proto'
]
exclude '../bar/proto/names.proto'
}
} }
However the exclude
statement does not work and names.proto
is still included in the protoc invocation, any ideas?