aboutsummaryrefslogtreecommitdiffstats
path: root/java
diff options
context:
space:
mode:
authorMax Cai <maxtroy@google.com>2014-01-14 14:54:48 +0000
committerMax Cai <maxtroy@google.com>2014-01-14 15:03:05 +0000
commit4109e91ce6035f84fa32b2e949501befbfb90159 (patch)
tree658c192b3ba42622bda56c352d018114c568d2c2 /java
parent4b5874fad099faefb469c632e4c7b854cea733ae (diff)
downloadexternal_protobuf-4109e91ce6035f84fa32b2e949501befbfb90159.zip
external_protobuf-4109e91ce6035f84fa32b2e949501befbfb90159.tar.gz
external_protobuf-4109e91ce6035f84fa32b2e949501befbfb90159.tar.bz2
Allow whitespace in nano codegen options.
So we don't need to keep all option in a single line in the .mk files. Change-Id: I786b879b334cac4cd13b32fabcb76efe53b4ac80
Diffstat (limited to 'java')
-rw-r--r--java/README.txt13
-rw-r--r--java/pom.xml6
2 files changed, 11 insertions, 8 deletions
diff --git a/java/README.txt b/java/README.txt
index ced78d2..0646c23 100644
--- a/java/README.txt
+++ b/java/README.txt
@@ -580,9 +580,9 @@ To use nano protobufs within the Android repo:
LOCAL_STATIC_JAVA_LIBRARIES variable, so you don't need to.
- Set 'LOCAL_PROTO_JAVA_OUTPUT_PARAMS := ...' in your local .mk file
for any command-line options you need. Use commas to join multiple
- options. Write all options on the same line; avoid backslash-newline
- or '+=', because they will introduce spaces in the middle of your
- options and the generator is not prepared to handle them.
+ options. In the nano flavor only, whitespace surrounding the option
+ names and values are ignored, so you can use backslash-newline or
+ '+=' to structure your make files nicely.
- The options will be applied to *all* proto files in LOCAL_SRC_FILES
when you build a Java library or package. In case different options
are needed for different proto files, build separate Java libraries
@@ -603,10 +603,9 @@ To use nano protobufs outside of Android repo:
- Invoke with --javanano_out, e.g.:
./protoc '--javanano_out=\
-java_package=src/proto/simple-data.proto|my_package,\
-java_outer_classname=src/proto/simple-data.proto|OuterName:\
-.' src/proto/simple-data.proto
-
+ java_package=src/proto/simple-data.proto|my_package,\
+ java_outer_classname=src/proto/simple-data.proto|OuterName\
+ :.' src/proto/simple-data.proto
Contributing to nano:
diff --git a/java/pom.xml b/java/pom.xml
index 2f40b98..d7ea4d1 100644
--- a/java/pom.xml
+++ b/java/pom.xml
@@ -133,7 +133,11 @@
</exec>
<!-- java nano -->
<exec executable="../src/protoc">
- <arg value="--javanano_out=java_package=google/protobuf/unittest_import_nano.proto|com.google.protobuf.nano,java_outer_classname=google/protobuf/unittest_import_nano.proto|UnittestImportNano,generate_equals=true:target/generated-test-sources" />
+ <arg value="--javanano_out=
+ java_package = google/protobuf/unittest_import_nano.proto|com.google.protobuf.nano,
+ java_outer_classname = google/protobuf/unittest_import_nano.proto|UnittestImportNano,
+ generate_equals = true
+ :target/generated-test-sources" />
<arg value="--proto_path=../src" />
<arg value="--proto_path=src/test/java" />
<arg value="../src/google/protobuf/unittest_nano.proto" />