Don't force libcore_private.stubs to be built with java 1.7

We no longer need to build libcore_private.stubs with java 1.7, because
the library is only built for target and not for host, where it
conflicts with the module jdk.unsupported.

Bug: 74211600
Test: m -j libprotobuf-java-lite is successful. both host and target
variant of the lib is generated.
Test: EXPERIMENTAL_USE_OPENJDK9=true m -j libprotobuf-java-lite is also
successful.

Change-Id: I61a49d537ee6abad29e5661944ffc612a94465b8
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,
 }