mirror of https://github.com/grpc/grpc-java.git
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.
This commit is contained in:
parent
877e1e11eb
commit
0a01b3cf42
|
|
@ -47,7 +47,7 @@ protobuf {
|
|||
task.plugins {
|
||||
grpc {
|
||||
// Options added to --grpc_out
|
||||
option 'nano=true'
|
||||
option 'nano'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -168,7 +168,7 @@ protobuf {
|
|||
}
|
||||
task.plugins {
|
||||
grpc {
|
||||
option 'nano=true'
|
||||
option 'nano'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -46,7 +46,7 @@ protobuf {
|
|||
task.plugins {
|
||||
grpc {
|
||||
// Options added to --grpc_out
|
||||
option 'nano=true'
|
||||
option 'nano'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue