Narayan Kamath | a77fadd | 2014-12-18 11:56:40 +0000 | [diff] [blame] | 1 | # |
| 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 | |
| 16 | LOCAL_PATH := $(call my-dir) |
| 17 | |
| 18 | # For the platform, compile everything except the carrier to phone number |
| 19 | # which isn't used. |
| 20 | libphonenumber_platform_resource_dirs := \ |
| 21 | libphonenumber/src \ |
| 22 | geocoder/src \ |
| 23 | internal/prefixmapper/src |
| 24 | |
| 25 | libphonenumber_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 | |
| 30 | libphonenumber_src_files := \ |
| 31 | $(libphonenumber_platform_src_files) \ |
| 32 | $(call all-java-files-under, carrier/src) |
| 33 | |
| 34 | libphonenumber_resource_dirs := \ |
| 35 | $(libphonenumber_platform_resource_dirs) \ |
| 36 | carrier/src |
| 37 | |
Neil Fuller | 47e2408 | 2015-09-18 15:07:41 +0100 | [diff] [blame] | 38 | libphonenumber_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 | |
| 44 | libphonenumber_test_resource_dirs := \ |
| 45 | carrier/test \ |
| 46 | geocoder/test \ |
| 47 | libphonenumber/test |
| 48 | |
Narayan Kamath | a77fadd | 2014-12-18 11:56:40 +0000 | [diff] [blame] | 49 | # For platform use, builds directly against core-libart to avoid circular |
| 50 | # dependencies. *NOT* for unbundled use. |
| 51 | include $(CLEAR_VARS) |
| 52 | LOCAL_MODULE := libphonenumber-platform |
| 53 | LOCAL_MODULE_TAGS := optional |
| 54 | LOCAL_SRC_FILES := $(libphonenumber_platform_src_files) |
| 55 | LOCAL_JAVA_RESOURCE_DIRS := $(libphonenumber_platform_resource_dirs) |
Narayan Kamath | a77fadd | 2014-12-18 11:56:40 +0000 | [diff] [blame] | 56 | LOCAL_JARJAR_RULES := $(LOCAL_PATH)/jarjar-rules.txt |
| 57 | LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk |
| 58 | LOCAL_NO_STANDARD_LIBRARIES := true |
Przemyslaw Szczepaniak | 1c3dadb | 2015-11-18 17:28:57 +0000 | [diff] [blame] | 59 | LOCAL_JAVA_LIBRARIES := core-oj core-libart |
Paul Duffin | 6b489f7 | 2015-12-07 15:54:05 +0000 | [diff] [blame] | 60 | LOCAL_STATIC_JAVA_LIBRARIES := libprotobuf-java-nano |
Neil Fuller | 365cb13 | 2016-02-16 13:20:14 +0000 | [diff] [blame^] | 61 | LOCAL_JAVA_LANGUAGE_VERSION := 1.7 |
Narayan Kamath | a77fadd | 2014-12-18 11:56:40 +0000 | [diff] [blame] | 62 | include $(BUILD_STATIC_JAVA_LIBRARY) |
| 63 | |
| 64 | # For unbundled use, supports gingerbread and up. |
| 65 | include $(CLEAR_VARS) |
Narayan Kamath | 0bb0023 | 2015-01-06 10:09:50 +0000 | [diff] [blame] | 66 | LOCAL_MODULE := libphonenumber |
Narayan Kamath | a77fadd | 2014-12-18 11:56:40 +0000 | [diff] [blame] | 67 | LOCAL_MODULE_TAGS := optional |
| 68 | LOCAL_SRC_FILES := $(libphonenumber_src_files) |
| 69 | LOCAL_JAVA_RESOURCE_DIRS := $(libphonenumber_resource_dirs) |
Narayan Kamath | a77fadd | 2014-12-18 11:56:40 +0000 | [diff] [blame] | 70 | LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk |
| 71 | LOCAL_SDK_VERSION := 9 |
Paul Duffin | 3bd754c | 2015-12-11 10:34:27 +0000 | [diff] [blame] | 72 | LOCAL_STATIC_JAVA_LIBRARIES := libprotobuf-java-nano |
Neil Fuller | 365cb13 | 2016-02-16 13:20:14 +0000 | [diff] [blame^] | 73 | LOCAL_JAVA_LANGUAGE_VERSION := 1.7 |
Narayan Kamath | a77fadd | 2014-12-18 11:56:40 +0000 | [diff] [blame] | 74 | include $(BUILD_STATIC_JAVA_LIBRARY) |
Neil Fuller | 47e2408 | 2015-09-18 15:07:41 +0100 | [diff] [blame] | 75 | |
| 76 | # Tests for unbundled use. |
Paul Duffin | 6b489f7 | 2015-12-07 15:54:05 +0000 | [diff] [blame] | 77 | # vogar --timeout 0 \ |
| 78 | --classpath out/target/common/obj/JAVA_LIBRARIES/libphonenumber-test_intermediates/classes.jar \ |
| 79 | com.google.i18n.phonenumbers |
Neil Fuller | 47e2408 | 2015-09-18 15:07:41 +0100 | [diff] [blame] | 80 | include $(CLEAR_VARS) |
| 81 | LOCAL_MODULE := libphonenumber-test |
| 82 | LOCAL_MODULE_TAGS := optional |
| 83 | LOCAL_SRC_FILES := $(libphonenumber_test_files) |
| 84 | LOCAL_JAVA_RESOURCE_DIRS := $(libphonenumber_test_resource_dirs) |
| 85 | LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk |
| 86 | LOCAL_SDK_VERSION := current |
Paul Duffin | 6b489f7 | 2015-12-07 15:54:05 +0000 | [diff] [blame] | 87 | LOCAL_STATIC_JAVA_LIBRARIES := libphonenumber libprotobuf-java-nano |
Neil Fuller | 365cb13 | 2016-02-16 13:20:14 +0000 | [diff] [blame^] | 88 | LOCAL_JAVA_LANGUAGE_VERSION := 1.7 |
Neil Fuller | 47e2408 | 2015-09-18 15:07:41 +0100 | [diff] [blame] | 89 | include $(BUILD_STATIC_JAVA_LIBRARY) |