From 0a01b3cf421b21f2fa9d058a835e53c81ca787bf Mon Sep 17 00:00:00 2001 From: Eric Anderson Date: Tue, 29 Mar 2016 16:16:21 -0700 Subject: [PATCH] Simplify nano flag to codegen to just 'nano' from 'nano=true' 'nano=true' still works, but any value is now ignored. This is to align with our lite flag, but also just because It's Cleaner. Note that this is counter to what javanano does. Javanano requires all flags have a value and uses true/false for many values. --- android-interop-testing/app/build.gradle | 2 +- compiler/README.md | 2 +- compiler/build.gradle | 2 +- compiler/src/java_plugin/cpp/java_plugin.cpp | 2 +- examples/android/app/build.gradle | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/android-interop-testing/app/build.gradle b/android-interop-testing/app/build.gradle index 3dfe35c902..874cdf5ef0 100644 --- a/android-interop-testing/app/build.gradle +++ b/android-interop-testing/app/build.gradle @@ -47,7 +47,7 @@ protobuf { task.plugins { grpc { // Options added to --grpc_out - option 'nano=true' + option 'nano' } } } diff --git a/compiler/README.md b/compiler/README.md index e78c08d89e..d09a70be81 100644 --- a/compiler/README.md +++ b/compiler/README.md @@ -40,7 +40,7 @@ $ protoc --plugin=protoc-gen-grpc-java=build/binaries/java_pluginExecutable/prot To generate Java interfaces with protobuf nano: ``` $ protoc --plugin=protoc-gen-grpc-java=build/binaries/java_pluginExecutable/protoc-gen-grpc-java \ - --grpc-java_out=nano=true:"$OUTPUT_FILE" --proto_path="$DIR_OF_PROTO_FILE" "$PROTO_FILE" + --grpc-java_out=nano:"$OUTPUT_FILE" --proto_path="$DIR_OF_PROTO_FILE" "$PROTO_FILE" ``` ## Installing the codegen to Maven local repository diff --git a/compiler/build.gradle b/compiler/build.gradle index b9e41732a2..30c5dcae4e 100644 --- a/compiler/build.gradle +++ b/compiler/build.gradle @@ -168,7 +168,7 @@ protobuf { } task.plugins { grpc { - option 'nano=true' + option 'nano' } } } diff --git a/compiler/src/java_plugin/cpp/java_plugin.cpp b/compiler/src/java_plugin/cpp/java_plugin.cpp index eb4a456dc4..5b4b19094e 100644 --- a/compiler/src/java_plugin/cpp/java_plugin.cpp +++ b/compiler/src/java_plugin/cpp/java_plugin.cpp @@ -38,7 +38,7 @@ class JavaGrpcGenerator : public google::protobuf::compiler::CodeGenerator { java_grpc_generator::ProtoFlavor flavor = java_grpc_generator::ProtoFlavor::NORMAL; for (int i = 0; i < options.size(); i++) { - if (options[i].first == "nano" && options[i].second == "true") { + if (options[i].first == "nano") { flavor = java_grpc_generator::ProtoFlavor::NANO; } else if (options[i].first == "lite") { flavor = java_grpc_generator::ProtoFlavor::LITE; diff --git a/examples/android/app/build.gradle b/examples/android/app/build.gradle index 155b62f112..462d65873d 100644 --- a/examples/android/app/build.gradle +++ b/examples/android/app/build.gradle @@ -46,7 +46,7 @@ protobuf { task.plugins { grpc { // Options added to --grpc_out - option 'nano=true' + option 'nano' } } }