blob: dd9be70a221986be2b4397f8f47542290831e78d [file] [log] [blame]
Narayan Kamatha77fadd2014-12-18 11:56:40 +00001#
2# Copyright (C) 2014 The Android Open Source Project
3#
4# Licensed under the Apache License, Version 2.0 (the "License");
5# you may not use this file except in compliance with the License.
6# You may obtain a copy of the License at
7#
8# http://www.apache.org/licenses/LICENSE-2.0
9#
10# Unless required by applicable law or agreed to in writing, software
11# distributed under the License is distributed on an "AS IS" BASIS,
12# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13# See the License for the specific language governing permissions and
14# limitations under the License.
15
16LOCAL_PATH := $(call my-dir)
17
18# For the platform, compile everything except the carrier to phone number
19# which isn't used.
20libphonenumber_platform_resource_dirs := \
21 libphonenumber/src \
22 geocoder/src \
23 internal/prefixmapper/src
24
25libphonenumber_platform_src_files := \
26 $(call all-java-files-under, libphonenumber/src) \
27 $(call all-java-files-under, geocoder/src) \
28 $(call all-java-files-under, internal/prefixmapper/src) \
29
30libphonenumber_src_files := \
31 $(libphonenumber_platform_src_files) \
32 $(call all-java-files-under, carrier/src)
33
34libphonenumber_resource_dirs := \
35 $(libphonenumber_platform_resource_dirs) \
36 carrier/src
37
Neil Fuller47e24082015-09-18 15:07:41 +010038libphonenumber_test_files := \
39 $(call all-java-files-under, carrier/test) \
40 $(call all-java-files-under, geocoder/test) \
41 $(call all-java-files-under, internal/prefixmapper/test) \
42 $(call all-java-files-under, libphonenumber/test)
43
44libphonenumber_test_resource_dirs := \
45 carrier/test \
46 geocoder/test \
47 libphonenumber/test
48
Narayan Kamatha77fadd2014-12-18 11:56:40 +000049# For platform use, builds directly against core-libart to avoid circular
50# dependencies. *NOT* for unbundled use.
51include $(CLEAR_VARS)
52LOCAL_MODULE := libphonenumber-platform
53LOCAL_MODULE_TAGS := optional
54LOCAL_SRC_FILES := $(libphonenumber_platform_src_files)
55LOCAL_JAVA_RESOURCE_DIRS := $(libphonenumber_platform_resource_dirs)
Narayan Kamatha77fadd2014-12-18 11:56:40 +000056LOCAL_JARJAR_RULES := $(LOCAL_PATH)/jarjar-rules.txt
57LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk
58LOCAL_NO_STANDARD_LIBRARIES := true
59LOCAL_JAVA_LIBRARIES := core-libart
Paul Duffin6b489f72015-12-07 15:54:05 +000060LOCAL_STATIC_JAVA_LIBRARIES := libprotobuf-java-nano
Narayan Kamatha77fadd2014-12-18 11:56:40 +000061include $(BUILD_STATIC_JAVA_LIBRARY)
62
63# For unbundled use, supports gingerbread and up.
64include $(CLEAR_VARS)
Narayan Kamath0bb00232015-01-06 10:09:50 +000065LOCAL_MODULE := libphonenumber
Narayan Kamatha77fadd2014-12-18 11:56:40 +000066LOCAL_MODULE_TAGS := optional
67LOCAL_SRC_FILES := $(libphonenumber_src_files)
68LOCAL_JAVA_RESOURCE_DIRS := $(libphonenumber_resource_dirs)
Narayan Kamatha77fadd2014-12-18 11:56:40 +000069LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk
70LOCAL_SDK_VERSION := 9
Paul Duffin3bd754c2015-12-11 10:34:27 +000071LOCAL_STATIC_JAVA_LIBRARIES := libprotobuf-java-nano
Narayan Kamatha77fadd2014-12-18 11:56:40 +000072include $(BUILD_STATIC_JAVA_LIBRARY)
Neil Fuller47e24082015-09-18 15:07:41 +010073
74# Tests for unbundled use.
Paul Duffin6b489f72015-12-07 15:54:05 +000075# vogar --timeout 0 \
76 --classpath out/target/common/obj/JAVA_LIBRARIES/libphonenumber-test_intermediates/classes.jar \
77 com.google.i18n.phonenumbers
Neil Fuller47e24082015-09-18 15:07:41 +010078include $(CLEAR_VARS)
79LOCAL_MODULE := libphonenumber-test
80LOCAL_MODULE_TAGS := optional
81LOCAL_SRC_FILES := $(libphonenumber_test_files)
82LOCAL_JAVA_RESOURCE_DIRS := $(libphonenumber_test_resource_dirs)
83LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk
84LOCAL_SDK_VERSION := current
Paul Duffin6b489f72015-12-07 15:54:05 +000085LOCAL_STATIC_JAVA_LIBRARIES := libphonenumber libprotobuf-java-nano
Neil Fuller47e24082015-09-18 15:07:41 +010086include $(BUILD_STATIC_JAVA_LIBRARY)