Skip to content

Commit

Permalink
[Fix 751] Add an experimentalEditions flag to allow use of edition to…
Browse files Browse the repository at this point in the history
… declare the proto syntax.

- See https://protobuf.dev/editions/overview/
  • Loading branch information
scr-oath committed Dec 17, 2024
1 parent 2810499 commit b0ac3eb
Showing 1 changed file with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,12 @@ public abstract class GenerateProtoTask extends DefaultTask {
*/
@Input
boolean includeImports

/**
* If true, protobuf files will use edition to declare their syntax.
*/
@Input
boolean experimentalEditions
}

@Internal("Handled as input via getDescriptorSetOptionsForCaching()")
Expand Down Expand Up @@ -645,6 +651,9 @@ public abstract class GenerateProtoTask extends DefaultTask {
if (descriptorSetOptions.includeSourceInfo) {
baseCmd += "--include_source_info"
}
if (descriptorSetOptions.experimentalEditions) {
baseCmd += "--experimental_editions"
}
}

List<List<String>> cmds = generateCmds(baseCmd, protoFiles, getCmdLengthLimit())
Expand Down

0 comments on commit b0ac3eb

Please sign in to comment.