Lines Matching +full:proguard +full:- +full:like
1 Protocol Buffers - Google's data interchange format
4 [](https://travis-ci.org/go…
13 Installation - With Maven
14 -------------------------
27 $ protoc --version
50 Installation - Without Maven
51 ----------------------------
61 $ protoc --version
68 $ protoc --java_out=src/main/java -I../src \
76 ------------
79 resource-restricted systems, like Android. It is very resource-friendly in both
83 - No descriptors or message builders.
84 - All messages are mutable; fields are public Java fields.
85 - For optional fields only, encapsulation behind setter/getter/hazzer/
86 clearer functions is opt-in, which provide proper 'has' state support.
87 - For proto2, if not opted in, has state (field presence) is not available.
91 - Required fields (proto2 only) are always serialized.
92 - Enum constants are integers; protection against invalid values only
94 - Enum constants can be generated into container interfaces bearing
96 - CodedInputByteBufferNano can only take byte[] (not InputStream).
97 - Similarly CodedOutputByteBufferNano can only write to byte[].
98 - Repeated fields are in arrays, not ArrayList or Vector. Null array
100 - Full support for serializing/deserializing repeated packed fields.
101 - Support extensions (in proto2).
102 - Unset messages/groups are null, not an immutable empty default
104 - toByteArray(...) and mergeFrom(...) are now static functions of
106 - The 'bytes' type translates to the Java type byte[].
108 The generated messages are not thread-safe for writes, but may be
109 used simultaneously from multiple threads in a read-only manner.
115 getCachedSize(), and getSerializedSize() are all considered read-only
130 IMPORTANT: If you have "bytes" fields with non-empty defaults
140 ----------------------
143 java_package -> <file-name>|<package-name>
144 java_outer_classname -> <file-name>|<package-name>
145 java_multiple_files -> true or false
146 java_nano_generate_has -> true or false [DEPRECATED]
147 optional_field_style -> default or accessors
148 enum_style -> c or java
149 ignore_services -> true or false
150 parcelable_messages -> true or false
151 generate_intdefs -> true or false
154 **java_package=\<file-name\>|\<package-name\>** (no default)
164 **java_outer_classname=\<file-name\>|\<outer-classname\>** (no default)
174 generated from file-scope messages and enums.
184 package-level classes for the file-scope messages in the
186 classes in the outer class). File-scope enum constants
236 IMPORTANT: When using the 'accessors' style, ProGuard should always
237 be enabled with optimization (don't use -dontoptimize) and allowing
238 access modification (use -allowaccessmodification). This removes the
241 TODO(maxtroy): find ProGuard config that would work the best.
279 Use C-style, so the enum constants are available at the scope where
280 the enum is defined. A file-scope enum's members are referenced like
281 'FileOuterClass.ENUM_VALUE'; a message-scope enum's members are
287 Use Java-style, so the enum constants are available under the enum
288 name and referenced like 'EnumName.ENUM_VALUE' (they are still int
290 the scope where the enum is defined. If the enum is file-scope and
293 implemented and ProGuard shrinking should be used, so after the Java
295 the interface remains unused and can be removed by ProGuard.
307 Android-specific option to generate Parcelable messages.
310 Android-specific option to generate @IntDef annotations for enums.
322 Your app must declare a compile-time dependency on the
323 android-support-annotations library.
326 compile-time type safety, see:
327 https://sites.google.com/a/android.com/tools/tech-docs/support-annotations
333 ----------------------------------------------
335 - Set 'LOCAL_PROTOC_OPTIMIZE_TYPE := nano' in your local .mk file.
339 - Set 'LOCAL_PROTO_JAVA_OUTPUT_PARAMS := ...' in your local .mk file
340 for any command-line options you need. Use commas to join multiple
342 names and values are ignored, so you can use backslash-newline or
344 - The options will be applied to *all* proto files in LOCAL_SRC_FILES
354 - Hint: 'include $(CLEAR_VARS)' resets all LOCAL_ variables, including
358 ----------------------------------------------
360 - Link with the generated jar file
361 \<protobuf-root\>java/target/protobuf-java-2.3.0-nano.jar.
362 - Invoke with --javanano_out, e.g.:
364 ./protoc '--javanano_out=\
365 java_package=src/proto/simple-data.proto|my_package,\
366 java_outer_classname=src/proto/simple-data.proto|OuterName\
367 :.' src/proto/simple-data.proto
371 ---------------------
377 - cd external/protobuf
378 - ./configure
379 - Run "make -j12 check" and verify all tests pass.
380 - cd java
381 - Run "mvn test" and verify all tests pass.
382 - cd ../../..
383 - . build/envsetup.sh
384 - lunch 1
385 - "make -j12 aprotoc libprotobuf-java-2.3.0-nano aprotoc-test-nano-params NanoAndroidTest" and
387 - Plug in an Android device or start an emulator.
388 - adb install -r out/target/product/generic/data/app/NanoAndroidTest.apk
389 - Run:
390 "adb shell am instrument -w com.google.protobuf.nano.test/android.test.InstrumentationTestRunner"
392 - repo sync -c -j256
393 - "make -j12" and check for build errors
396 -----
401 https://developers.google.com/protocol-buffers/