Skip to content

Commit

Permalink
Simplify nano flag to codegen to just 'nano' from 'nano=true'
Browse files Browse the repository at this point in the history
'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.
  • Loading branch information
ejona86 committed Mar 30, 2016
1 parent 877e1e1 commit 0a01b3c
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion android-interop-testing/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ protobuf {
task.plugins {
grpc {
// Options added to --grpc_out
option 'nano=true'
option 'nano'
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion compiler/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion compiler/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ protobuf {
}
task.plugins {
grpc {
option 'nano=true'
option 'nano'
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion compiler/src/java_plugin/cpp/java_plugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion examples/android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ protobuf {
task.plugins {
grpc {
// Options added to --grpc_out
option 'nano=true'
option 'nano'
}
}
}
Expand Down

0 comments on commit 0a01b3c

Please sign in to comment.