Add includeFilter
and excludeFilter
as a posibility to decide what .proto's to generate
#29
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hello
Thanks for this great plugin.
includeFilter
andexcludeFilter
are common among plugins that generate code. In this particular case it would allow us to select what protos we want to ignore or "compile".It's useful especially when having dependencies with a number of protos but we are only interested in only a few. Also when some libraries contain protos and also the java classes and we do not want to re-compile them in order to avoid duplicates in our classpath
An example (that I already use) would be:
(excludeFilter in PB.protobufConfig) := "value-types.proto" || "documentation.proto"
That would include all protos except "value-types.proto" and "documentation.proto"
The default setup doesn't modify the existing filter. This is: "*.proto"
For more information about include and exclude filter, please have a look to: http://www.scala-sbt.org/0.13/docs/Howto-Customizing-Paths.html#Include%2Fexclude+files+in+the+source+directory
Regards