From 78c6183ef8045446d7f20a1fca3bbae12ec10f21 Mon Sep 17 00:00:00 2001 From: Thomas Haines Date: Fri, 16 Apr 2021 18:47:18 +0800 Subject: [PATCH] Use conflicting path to build-in proto3 type --- .../protobuf/gradle/ProtobufExtract.groovy | 2 +- .../google/type/{sample.proto => money.proto} | 17 ++++++++++++++++- 2 files changed, 17 insertions(+), 2 deletions(-) rename testProjectKotlinDslCopySpec/src/main/proto/google/type/{sample.proto => money.proto} (56%) diff --git a/src/main/groovy/com/google/protobuf/gradle/ProtobufExtract.groovy b/src/main/groovy/com/google/protobuf/gradle/ProtobufExtract.groovy index fc65bba2..988d6192 100644 --- a/src/main/groovy/com/google/protobuf/gradle/ProtobufExtract.groovy +++ b/src/main/groovy/com/google/protobuf/gradle/ProtobufExtract.groovy @@ -115,7 +115,7 @@ abstract class ProtobufExtract extends DefaultTask { spec.include('**/*.proto') spec.into(destDir) // gradle 7+ requires a duplicate strategy to be explicitly defined - spec.duplicatesStrategy = DuplicatesStrategy.INCLUDE + // spec.duplicatesStrategy = DuplicatesStrategy.INCLUDE } } diff --git a/testProjectKotlinDslCopySpec/src/main/proto/google/type/sample.proto b/testProjectKotlinDslCopySpec/src/main/proto/google/type/money.proto similarity index 56% rename from testProjectKotlinDslCopySpec/src/main/proto/google/type/sample.proto rename to testProjectKotlinDslCopySpec/src/main/proto/google/type/money.proto index f5748cb1..e105a9b4 100644 --- a/testProjectKotlinDslCopySpec/src/main/proto/google/type/sample.proto +++ b/testProjectKotlinDslCopySpec/src/main/proto/google/type/money.proto @@ -16,12 +16,27 @@ syntax = "proto3"; package google.type; +option cc_enable_arenas = true; +option go_package = "google.golang.org/genproto/googleapis/type/money;money"; option java_multiple_files = true; option java_outer_classname = "MoneyProto"; option java_package = "com.google.type"; +option objc_class_prefix = "GTP"; // Represents an amount of money with its currency type. message Money { // The three-letter currency code defined in ISO 4217. string currency_code = 1; -} + + // The whole units of the amount. + // For example if `currencyCode` is `"USD"`, then 1 unit is one US dollar. + int64 units = 2; + + // Number of nano (10^-9) units of the amount. + // The value must be between -999,999,999 and +999,999,999 inclusive. + // If `units` is positive, `nanos` must be positive or zero. + // If `units` is zero, `nanos` can be positive, zero, or negative. + // If `units` is negative, `nanos` must be negative or zero. + // For example $-1.75 is represented as `units`=-1 and `nanos`=-750,000,000. + int32 nanos = 3; +} \ No newline at end of file