Merge "Don't force libcore_private.stubs to be built with java 1.7" am: 022ab7e7c9
am: 2e49781a48

Change-Id: I4c7a2fd18908c73d429119147a7f63b8402ead6d
diff --git a/Android.bp b/Android.bp
index b5aa827..84b1022 100644
--- a/Android.bp
+++ b/Android.bp
@@ -550,7 +550,11 @@
         "java/core/src/main/java/com/google/protobuf/WireFormat.java",
     ],
 
-    libs: ["libcore_private.stubs"],
+    target: {
+        android: {
+            libs: ["libcore_private.stubs"],
+        },
+    },
 
     java_version: "1.7",
 }
@@ -588,11 +592,7 @@
 // =======================================================
 java_library {
     name: "libcore_private.stubs",
-    host_supported: true,
     srcs: ["java/core/src/stubs/**/*.java"],
     sdk_version: "core_current",
-    // This library can't be build with JDK9 since the same package (sun.misc) already
-    // exist in jdk.unsupported module. Using the same Java version as libprotobuf-java-lite.
-    java_version: "1.7",
     installable: false,
 }