diff --git a/src/main/groovy/com/google/protobuf/gradle/GenerateProtoTask.groovy b/src/main/groovy/com/google/protobuf/gradle/GenerateProtoTask.groovy index 0ce54372..4ba80c10 100644 --- a/src/main/groovy/com/google/protobuf/gradle/GenerateProtoTask.groovy +++ b/src/main/groovy/com/google/protobuf/gradle/GenerateProtoTask.groovy @@ -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()") @@ -645,6 +651,9 @@ public abstract class GenerateProtoTask extends DefaultTask { if (descriptorSetOptions.includeSourceInfo) { baseCmd += "--include_source_info" } + if (descriptorSetOptions.experimentalEditions) { + baseCmd += "--experimental_editions" + } } List> cmds = generateCmds(baseCmd, protoFiles, getCmdLengthLimit())