summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorColin Cross <ccross@android.com>2017-10-15 02:19:43 +0000
committerandroid-build-merger <android-build-merger@google.com>2017-10-15 02:19:43 +0000
commit9462c32de68ee18be6cd476f403ffe9e2db82cb7 (patch)
treeb421d91d833ba930a6f3d91c56321239811d9df7
parente27e5dffddc8815d0c9dc74dd188b41eec944831 (diff)
parent7d0c1e1535448a901f435c67d4e716710ea912cd (diff)
downloadlibphonenumber-9462c32de68ee18be6cd476f403ffe9e2db82cb7.tar.gz
Merge "Convert libphonenumber to Android.bp" am: 8b537942f7
am: 7d0c1e1535 Change-Id: I37d0a581bd95db7704d02b77679006d7cad7e7b6
-rw-r--r--Android.bp56
-rw-r--r--Android.mk45
2 files changed, 56 insertions, 45 deletions
diff --git a/Android.bp b/Android.bp
new file mode 100644
index 00000000..83801dd1
--- /dev/null
+++ b/Android.bp
@@ -0,0 +1,56 @@
+//
+// 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.
+
+// For the platform, compile everything except the carrier to phone number
+// which isn't used.
+java_defaults {
+ name: "libphonenumber-platform-defaults",
+ java_resource_dirs: [
+ "libphonenumber/src",
+ "geocoder/src",
+ "internal/prefixmapper/src",
+ ],
+
+ srcs: [
+ "libphonenumber/src/**/*.java",
+ "geocoder/src/**/*.java",
+ "internal/prefixmapper/src/**/*.java",
+ ],
+}
+
+// For platform use, builds directly against core-libart to avoid circular
+// dependencies. *NOT* for unbundled use.
+java_library_static {
+ name: "libphonenumber-platform",
+ defaults: ["libphonenumber-platform-defaults"],
+
+ jarjar_rules: "jarjar-rules.txt",
+
+ no_framework_libs: true,
+ java_version: "1.7",
+}
+
+// For unbundled use, supports gingerbread and up.
+java_library_static {
+ name: "libphonenumber",
+ defaults: ["libphonenumber-platform-defaults"],
+
+ srcs: ["carrier/src/**/*.java"],
+ java_resource_dirs: ["carrier/src"],
+
+ sdk_version: "9",
+ java_version: "1.7",
+}
+
diff --git a/Android.mk b/Android.mk
index 157fbd19..eabff584 100644
--- a/Android.mk
+++ b/Android.mk
@@ -15,26 +15,6 @@
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
-
libphonenumber_test_files := \
$(call all-java-files-under, carrier/test) \
$(call all-java-files-under, geocoder/test) \
@@ -46,31 +26,6 @@ libphonenumber_test_resource_dirs := \
geocoder/test \
libphonenumber/test
-# 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_JARJAR_RULES := $(LOCAL_PATH)/jarjar-rules.txt
-LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk
-LOCAL_NO_STANDARD_LIBRARIES := true
-LOCAL_JAVA_LIBRARIES := core-oj core-libart
-LOCAL_JAVA_LANGUAGE_VERSION := 1.7
-include $(BUILD_STATIC_JAVA_LIBRARY)
-
-# For unbundled use, supports gingerbread and up.
-include $(CLEAR_VARS)
-LOCAL_MODULE := libphonenumber
-LOCAL_MODULE_TAGS := optional
-LOCAL_SRC_FILES := $(libphonenumber_src_files)
-LOCAL_JAVA_RESOURCE_DIRS := $(libphonenumber_resource_dirs)
-LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk
-LOCAL_SDK_VERSION := 9
-LOCAL_JAVA_LANGUAGE_VERSION := 1.7
-include $(BUILD_STATIC_JAVA_LIBRARY)
-
# Tests for unbundled use.
# vogar --timeout 0 \
--classpath out/target/common/obj/JAVA_LIBRARIES/libphonenumber-test_intermediates/classes.jack \