google / google/protobuf-gradle-plugin
Inclusion patterns do not work with multiple `srcDir`s
- Dominant language
- Groovy
- Stars
- 1.8k
- Forks
- 288
- PR merge metrics
- No merged PRs in 30d
Description
Example:
```
sourceSets {
main {
proto {
srcDir("directory-1").setIncludes(
listOf(
"file-in-directory-1",
)
)
srcDir("directory-2")
}
}
}
```
In this example, none of the files from the `directory-2` are processed, because the generated `protoc` command applies inclusion filter `file-in-directory-1` to both folders.
Current workaround for this is to explicitly add all files from `directory-2` to `setIncludes` of `directory-1` which can be quite cumbersome.
Contributor guide
Research direction
Reproduce the issue with the provided sourceSets configuration and inspect the generated protoc command. Trace how inclusion patterns are applied across multiple srcDir entries; done means files in directory-2 are processed without requiring them in directory-1's setIncludes.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- groovy
- Domain
- build-system
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100