summaryrefslogtreecommitdiff
path: root/Android.mk
diff options
context:
space:
mode:
authorNarayan Kamath <narayan@google.com>2014-12-18 11:56:40 +0000
committerNarayan Kamath <narayan@google.com>2014-12-23 12:32:44 +0000
commita77faddfc3b3e4cca8f585c82d669054aec221f4 (patch)
treeb3ca5eaf70be2df2a1a9cfc684532d1563d759a7 /Android.mk
parenteec8af34d3129d0f37c45ff8a82b4212724a6d79 (diff)
downloadlibphonenumber-a77faddfc3b3e4cca8f585c82d669054aec221f4.tar.gz
Update libphonenumber to an unmodified copy of v7.0.1
Copied from upstream commit eb7f783d2fd7d222a10283a72d9e7 with no local modifications and a cherry-pick of commit 5b00cb5b2dc0582c29 (JAVA/JS: Documentation fix and added missing licences.) from upstream master. Added Android.mk to build the code for platform and unbundled use. Note that while we rename packages, we don't rename resources to make sure they're found. Change-Id: Idb886f1b5d7bca491b9f7f8d18574a88f08593ba
Diffstat (limited to 'Android.mk')
-rw-r--r--Android.mk63
1 files changed, 63 insertions, 0 deletions
diff --git a/Android.mk b/Android.mk
new file mode 100644
index 00000000..1464a475
--- /dev/null
+++ b/Android.mk
@@ -0,0 +1,63 @@
+#
+# Copyright (C) 2014 The Android Open Source Project
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+LOCAL_PATH := $(call my-dir)
+
+# For the platform, compile everything except the carrier to phone number
+# which isn't used.
+libphonenumber_platform_resource_dirs := \
+ libphonenumber/src \
+ geocoder/src \
+ internal/prefixmapper/src
+
+libphonenumber_platform_src_files := \
+ $(call all-java-files-under, libphonenumber/src) \
+ $(call all-java-files-under, geocoder/src) \
+ $(call all-java-files-under, internal/prefixmapper/src) \
+
+libphonenumber_src_files := \
+ $(libphonenumber_platform_src_files) \
+ $(call all-java-files-under, carrier/src)
+
+libphonenumber_resource_dirs := \
+ $(libphonenumber_platform_resource_dirs) \
+ carrier/src
+
+# For platform use, builds directly against core-libart to avoid circular
+# dependencies. *NOT* for unbundled use.
+include $(CLEAR_VARS)
+LOCAL_MODULE := libphonenumber-platform
+LOCAL_MODULE_TAGS := optional
+LOCAL_SRC_FILES := $(libphonenumber_platform_src_files)
+LOCAL_JAVA_RESOURCE_DIRS := $(libphonenumber_platform_resource_dirs)
+LOCAL_JAVACFLAGS := -encoding UTF-8
+LOCAL_JARJAR_RULES := $(LOCAL_PATH)/jarjar-rules.txt
+LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk
+LOCAL_NO_STANDARD_LIBRARIES := true
+LOCAL_JAVA_LIBRARIES := core-libart
+include $(BUILD_STATIC_JAVA_LIBRARY)
+
+# For unbundled use, supports gingerbread and up.
+include $(CLEAR_VARS)
+# TODO: Rename to libphonenumber once dependencies have been
+# renamed.
+LOCAL_MODULE := libphonenumber-unbundled
+LOCAL_MODULE_TAGS := optional
+LOCAL_SRC_FILES := $(libphonenumber_src_files)
+LOCAL_JAVA_RESOURCE_DIRS := $(libphonenumber_resource_dirs)
+LOCAL_JAVACFLAGS := -encoding UTF-8
+LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk
+LOCAL_SDK_VERSION := 9
+include $(BUILD_STATIC_JAVA_LIBRARY)