diff options
author | Jeff Davidson <jpd@google.com> | 2015-02-11 13:12:14 -0800 |
---|---|---|
committer | Jeff Davidson <jpd@google.com> | 2015-02-19 19:55:26 +0000 |
commit | 30d873bd66f50a6021de5d44d7ee5b8a809b0524 (patch) | |
tree | c4cec97120f5b387aa9ea6910ff1e839725ccfb8 /Android.mk | |
parent | eb5ae9e258a8fc953e6cf0b3a0dd04a112a05a3c (diff) | |
download | external_protobuf-30d873bd66f50a6021de5d44d7ee5b8a809b0524.zip external_protobuf-30d873bd66f50a6021de5d44d7ee5b8a809b0524.tar.gz external_protobuf-30d873bd66f50a6021de5d44d7ee5b8a809b0524.tar.bz2 |
Generate @IntDef annotations for nanoproto enums.
@IntDef is a support library annotation which allows build tools to
determine the valid set of values for a given integer field when that
field is intended to be restricted like an enum. This avoids the
overhead of enums while still allowing for compile-time type checking
in most circumstances.
Change-Id: Iee02e0b49a8e069f6456572f538e0a0d301fdfd5
Diffstat (limited to 'Android.mk')
-rw-r--r-- | Android.mk | 8 |
1 files changed, 7 insertions, 1 deletions
@@ -462,6 +462,8 @@ include $(CLEAR_VARS) LOCAL_MODULE := android-nano-test-parcelable LOCAL_MODULE_TAGS := tests LOCAL_SDK_VERSION := current +# Only needed at compile-time. +LOCAL_JAVA_LIBRARIES := android-support-annotations LOCAL_PROTOC_OPTIMIZE_TYPE := nano @@ -470,7 +472,8 @@ LOCAL_SRC_FILES := src/google/protobuf/unittest_simple_nano.proto LOCAL_PROTOC_FLAGS := --proto_path=$(LOCAL_PATH)/src LOCAL_PROTO_JAVA_OUTPUT_PARAMS := \ - parcelable_messages = true + parcelable_messages = true, \ + generate_intdefs = true include $(BUILD_STATIC_JAVA_LIBRARY) @@ -480,6 +483,8 @@ include $(CLEAR_VARS) LOCAL_MODULE := android-nano-test-parcelable-extendable LOCAL_MODULE_TAGS := tests LOCAL_SDK_VERSION := current +# Only needed at compile-time. +LOCAL_JAVA_LIBRARIES := android-support-annotations LOCAL_PROTOC_OPTIMIZE_TYPE := nano @@ -489,6 +494,7 @@ LOCAL_PROTOC_FLAGS := --proto_path=$(LOCAL_PATH)/src LOCAL_PROTO_JAVA_OUTPUT_PARAMS := \ parcelable_messages = true, \ + generate_intdefs = true, \ store_unknown_fields = true include $(BUILD_STATIC_JAVA_LIBRARY) |