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.
Support specifying
descriptor_set_in
files for aGenerateProtoTask
Usage (in gradle.kts)
It's a very naive implementation, but it does the job for me
I also considered other options
Let me know if you think any of these options is better for the project.
I'm not an expert at all on protobuf and you might find this PR not appropriate for the project, considering protocolbuffers/protobuf#3973
Related: #251
Testing
If you think the PR is appropriate for merging, I would like to add tests for this feature. But I'll need some guidance on where to add them and how to run tests locally.
Use Case
I want to generate code from the descriptor set by passing the proto file names contained in the binary file. This requires some extra tweaks on the plugin that I don't think are worth sharing upstream, but this is the protoc command I'm interested in obtaining
because
demo.proto
does not exist inSomePaths
,protoc
falls back to looking fordemo.proto
in thedescriptor_set_in
and generatesclass Demo extends GeneratedMessageV3