Merge "Fixed minor issue in update script argument handling" am: 5db95509d2 am: 6f960b3c42
am: 2cd1557b99

Change-Id: I772ca6290af29a7a06653f7bbf812e6c6508175e
diff --git a/Android.bp b/Android.bp
index 5bc72c0..500ea48 100644
--- a/Android.bp
+++ b/Android.bp
@@ -13,10 +13,13 @@
 // 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",
+// For platform use, builds directly against core-libart to avoid circular
+// dependencies. *NOT* for unbundled use.
+java_library_static {
+    name: "libphonenumber-platform",
+
+    // For the platform, compile everything except the carrier to phone number
+    // which isn't used.
     java_resource_dirs: [
         "libphonenumber/src",
         "geocoder/src",
@@ -28,27 +31,44 @@
         "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",
 
     sdk_version: "core_current",
     java_version: "1.7",
 }
 
+
+java_defaults {
+    name: "libphonenumber-unbundled-defaults",
+    java_resource_dirs: [
+        "libphonenumber/src",
+        "carrier/src",
+        "internal/prefixmapper/src",
+    ],
+
+    srcs: [
+        "libphonenumber/src/**/*.java",
+        "carrier/src/**/*.java",
+        "internal/prefixmapper/src/**/*.java",
+    ],
+}
+
 // For unbundled use, supports gingerbread and up.
 java_library_static {
     name: "libphonenumber",
-    defaults: ["libphonenumber-platform-defaults"],
+    defaults: ["libphonenumber-unbundled-defaults"],
 
-    srcs: ["carrier/src/**/*.java"],
-    java_resource_dirs: ["carrier/src"],
+    srcs: ["geocoder/src/**/*.java"],
+    java_resource_dirs: ["geocoder/src"],
+
+    sdk_version: "9",
+    java_version: "1.7",
+}
+
+// For unbundled use - without geocoder
+java_library_static {
+    name: "libphonenumber-nogeocoder",
+    defaults: ["libphonenumber-unbundled-defaults"],
 
     sdk_version: "9",
     java_version: "1.7",
diff --git a/Android.mk b/Android.mk
index eabff58..e17e594 100644
--- a/Android.mk
+++ b/Android.mk
@@ -37,6 +37,6 @@
 LOCAL_JAVA_RESOURCE_DIRS := $(libphonenumber_test_resource_dirs)
 LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk
 LOCAL_SDK_VERSION := current
-LOCAL_STATIC_JAVA_LIBRARIES := libphonenumber legacy-android-test junit
+LOCAL_STATIC_JAVA_LIBRARIES := libphonenumber junit
 LOCAL_JAVA_LANGUAGE_VERSION := 1.7
 include $(BUILD_STATIC_JAVA_LIBRARY)