• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (C) 2009 The Android Open Source Project
2#
3# Licensed under the Apache License, Version 2.0 (the "License");
4# you may not use this file except in compliance with the License.
5# You may obtain a copy of the License at
6#
7#      http://www.apache.org/licenses/LICENSE-2.0
8#
9# Unless required by applicable law or agreed to in writing, software
10# distributed under the License is distributed on an "AS IS" BASIS,
11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12# See the License for the specific language governing permissions and
13# limitations under the License.
14#
15#
16
17LOCAL_PATH := $(call my-dir)
18
19JAVA_LITE_SRC_FILES := \
20    java/core/src/main/java/com/google/protobuf/AbstractMessageLite.java \
21    java/core/src/main/java/com/google/protobuf/AbstractParser.java \
22    java/core/src/main/java/com/google/protobuf/AbstractProtobufList.java \
23    java/core/src/main/java/com/google/protobuf/ByteOutput.java \
24    java/core/src/main/java/com/google/protobuf/ByteString.java \
25    java/core/src/main/java/com/google/protobuf/BooleanArrayList.java \
26    java/core/src/main/java/com/google/protobuf/CodedInputStream.java \
27    java/core/src/main/java/com/google/protobuf/CodedOutputStream.java \
28    java/core/src/main/java/com/google/protobuf/DoubleArrayList.java \
29    java/core/src/main/java/com/google/protobuf/ExperimentalApi.java \
30    java/core/src/main/java/com/google/protobuf/ExtensionLite.java \
31    java/core/src/main/java/com/google/protobuf/ExtensionRegistryLite.java \
32    java/core/src/main/java/com/google/protobuf/FieldSet.java \
33    java/core/src/main/java/com/google/protobuf/FloatArrayList.java \
34    java/core/src/main/java/com/google/protobuf/GeneratedMessageLite.java \
35    java/core/src/main/java/com/google/protobuf/IntArrayList.java \
36    java/core/src/main/java/com/google/protobuf/Internal.java \
37    java/core/src/main/java/com/google/protobuf/InvalidProtocolBufferException.java \
38    java/core/src/main/java/com/google/protobuf/LazyField.java \
39    java/core/src/main/java/com/google/protobuf/LazyFieldLite.java \
40    java/core/src/main/java/com/google/protobuf/LazyStringArrayList.java \
41    java/core/src/main/java/com/google/protobuf/LazyStringList.java \
42    java/core/src/main/java/com/google/protobuf/LongArrayList.java \
43    java/core/src/main/java/com/google/protobuf/MapFieldLite.java \
44    java/core/src/main/java/com/google/protobuf/MessageLite.java \
45    java/core/src/main/java/com/google/protobuf/MessageLiteToString.java \
46    java/core/src/main/java/com/google/protobuf/MessageLiteOrBuilder.java \
47    java/core/src/main/java/com/google/protobuf/MutabilityOracle.java \
48    java/core/src/main/java/com/google/protobuf/Parser.java \
49    java/core/src/main/java/com/google/protobuf/ProtobufArrayList.java \
50    java/core/src/main/java/com/google/protobuf/ProtocolStringList.java \
51    java/core/src/main/java/com/google/protobuf/RopeByteString.java \
52    java/core/src/main/java/com/google/protobuf/SmallSortedMap.java \
53    java/core/src/main/java/com/google/protobuf/TextFormatEscaper.java \
54    java/core/src/main/java/com/google/protobuf/UninitializedMessageException.java \
55    java/core/src/main/java/com/google/protobuf/UnknownFieldSetLite.java \
56    java/core/src/main/java/com/google/protobuf/UnmodifiableLazyStringList.java \
57    java/core/src/main/java/com/google/protobuf/Utf8.java \
58    java/core/src/main/java/com/google/protobuf/WireFormat.java
59
60# This contains more source files than needed for the full version, but the
61# additional files should not create any conflict.
62JAVA_FULL_SRC_FILES := \
63    $(call all-java-files-under, java/core/src/main/java) \
64    src/google/protobuf/descriptor.proto
65
66# Java nano library (for device-side users)
67# =======================================================
68include $(CLEAR_VARS)
69
70LOCAL_MODULE := libprotobuf-java-nano
71LOCAL_MODULE_TAGS := optional
72LOCAL_SDK_VERSION := 9
73
74LOCAL_SRC_FILES := $(call all-java-files-under, javanano/src/main/java/com/google/protobuf/nano)
75LOCAL_SRC_FILES += $(call all-java-files-under, javanano/src/device/main/java/com/google/protobuf/nano)
76
77LOCAL_JAVA_LANGUAGE_VERSION := 1.7
78include $(BUILD_STATIC_JAVA_LIBRARY)
79
80# Java nano library (for host-side users)
81# =======================================================
82include $(CLEAR_VARS)
83
84LOCAL_MODULE := host-libprotobuf-java-nano
85LOCAL_MODULE_TAGS := optional
86
87LOCAL_SRC_FILES := $(call all-java-files-under, javanano/src/main/java/com/google/protobuf/nano)
88
89LOCAL_JAVA_LANGUAGE_VERSION := 1.7
90include $(BUILD_HOST_JAVA_LIBRARY)
91
92# Java micro library (for device-side users)
93# =======================================================
94include $(CLEAR_VARS)
95
96LOCAL_MODULE := libprotobuf-java-micro
97LOCAL_MODULE_TAGS := optional
98LOCAL_SDK_VERSION := 8
99
100LOCAL_SRC_FILES := $(call all-java-files-under, javamicro/src/main/java/com/google/protobuf/micro)
101
102LOCAL_JAVA_LANGUAGE_VERSION := 1.7
103include $(BUILD_STATIC_JAVA_LIBRARY)
104
105# Java micro library (for host-side users)
106# =======================================================
107include $(CLEAR_VARS)
108
109LOCAL_MODULE := host-libprotobuf-java-micro
110LOCAL_MODULE_TAGS := optional
111
112LOCAL_SRC_FILES := $(call all-java-files-under, javamicro/src/main/java/com/google/protobuf/micro)
113
114LOCAL_JAVA_LANGUAGE_VERSION := 1.7
115include $(BUILD_HOST_JAVA_LIBRARY)
116
117# Java lite library (for device-side users)
118# =======================================================
119include $(CLEAR_VARS)
120
121LOCAL_MODULE := libprotobuf-java-lite
122LOCAL_MODULE_TAGS := optional
123
124LOCAL_SRC_FILES := $(JAVA_LITE_SRC_FILES)
125
126LOCAL_JAVA_LANGUAGE_VERSION := 1.7
127include $(BUILD_STATIC_JAVA_LIBRARY)
128
129# Java lite library (for host-side users)
130# =======================================================
131include $(CLEAR_VARS)
132
133LOCAL_MODULE := host-libprotobuf-java-lite
134LOCAL_MODULE_TAGS := optional
135
136LOCAL_SRC_FILES := $(JAVA_LITE_SRC_FILES)
137
138LOCAL_JAVA_LANGUAGE_VERSION := 1.7
139include $(BUILD_HOST_JAVA_LIBRARY)
140
141# Java full library (for host-side users)
142# =======================================================
143include $(CLEAR_VARS)
144
145LOCAL_MODULE := host-libprotobuf-java-full
146LOCAL_MODULE_TAGS := optional
147
148LOCAL_SRC_FILES := $(JAVA_FULL_SRC_FILES)
149
150LOCAL_JAVA_LANGUAGE_VERSION := 1.7
151include $(BUILD_HOST_JAVA_LIBRARY)
152
153# To test java proto params build rules.
154# =======================================================
155include $(CLEAR_VARS)
156
157LOCAL_MODULE := aprotoc-test-nano-params
158LOCAL_MODULE_TAGS := tests
159LOCAL_SDK_VERSION := current
160
161LOCAL_PROTOC_OPTIMIZE_TYPE := nano
162
163LOCAL_SRC_FILES := \
164        javanano/src/test/java/com/google/protobuf/nano/unittest_import_nano.proto \
165        javanano/src/test/java/com/google/protobuf/nano/unittest_simple_nano.proto \
166        javanano/src/test/java/com/google/protobuf/nano/unittest_stringutf8_nano.proto \
167        javanano/src/test/java/com/google/protobuf/nano/unittest_recursive_nano.proto
168
169
170LOCAL_PROTOC_FLAGS := --proto_path=$(LOCAL_PATH)/src
171
172LOCAL_PROTO_JAVA_OUTPUT_PARAMS := \
173        java_package = $(LOCAL_PATH)javanano/src/test/java/com/google/protobuf/nano/unittest_import_nano.proto|com.google.protobuf.nano, \
174        java_outer_classname = $(LOCAL_PATH)/javanano/src/test/java/com/google/protobuf/nano/unittest_import_nano.proto|UnittestImportNano
175
176LOCAL_JAVA_LANGUAGE_VERSION := 1.7
177include $(BUILD_STATIC_JAVA_LIBRARY)
178
179# To test Android-specific nanoproto features.
180# =======================================================
181include $(CLEAR_VARS)
182
183# Parcelable messages
184LOCAL_MODULE := android-nano-test-parcelable
185LOCAL_MODULE_TAGS := tests
186LOCAL_SDK_VERSION := current
187# Only needed at compile-time.
188LOCAL_JAVA_LIBRARIES := android-support-annotations
189
190LOCAL_PROTOC_OPTIMIZE_TYPE := nano
191
192LOCAL_SRC_FILES := javanano/src/test/java/com/google/protobuf/nano/unittest_simple_nano.proto
193
194LOCAL_PROTOC_FLAGS := --proto_path=$(LOCAL_PATH)/src
195
196LOCAL_PROTO_JAVA_OUTPUT_PARAMS := \
197        parcelable_messages = true, \
198        generate_intdefs = true
199
200include $(BUILD_STATIC_JAVA_LIBRARY)
201
202include $(CLEAR_VARS)
203
204# Parcelable and extendable messages
205LOCAL_MODULE := android-nano-test-parcelable-extendable
206LOCAL_MODULE_TAGS := tests
207LOCAL_SDK_VERSION := current
208# Only needed at compile-time.
209LOCAL_JAVA_LIBRARIES := android-support-annotations
210
211LOCAL_PROTOC_OPTIMIZE_TYPE := nano
212
213LOCAL_SRC_FILES := javanano/src/test/java/com/google/protobuf/nano/unittest_extension_nano.proto
214
215LOCAL_PROTOC_FLAGS := --proto_path=$(LOCAL_PATH)/src
216
217LOCAL_PROTO_JAVA_OUTPUT_PARAMS := \
218        parcelable_messages = true, \
219        generate_intdefs = true, \
220        store_unknown_fields = true
221
222LOCAL_JAVA_LANGUAGE_VERSION := 1.7
223include $(BUILD_STATIC_JAVA_LIBRARY)
224
225include $(CLEAR_VARS)
226
227# Test APK
228LOCAL_PACKAGE_NAME := NanoAndroidTest
229
230LOCAL_SDK_VERSION := 8
231
232LOCAL_MODULE_TAGS := tests
233
234LOCAL_SRC_FILES := $(call all-java-files-under, javanano/src/device/test/java/com/google/protobuf/nano)
235
236LOCAL_MANIFEST_FILE := javanano/src/device/test/AndroidManifest.xml
237
238LOCAL_STATIC_JAVA_LIBRARIES := libprotobuf-java-nano \
239        android-nano-test-parcelable \
240        android-nano-test-parcelable-extendable
241
242LOCAL_DEX_PREOPT := false
243
244include $(BUILD_PACKAGE)
245