Revert "core-all-system-modules: Restrict visibility."

This reverts commit 5a63e0e221801b06db425b3f23942d8a3a3adf61.

Reason for revert: Neil suggested a better approach in a review comment on https://android-review.googlesource.com/c/platform/libcore/+/971162 , so I'm reverting this CL and then implementing the other approach.

Test: Treehugger
Change-Id: I057f9141a034338bde9d2a56cb14b796adbbdf09
diff --git a/JavaLibrary.bp b/JavaLibrary.bp
index 29bbfcf..4ce3629 100644
--- a/JavaLibrary.bp
+++ b/JavaLibrary.bp
@@ -145,10 +145,10 @@
     system_modules: "none",
 }
 
-// Common attributes for core-all-* targets.
-java_defaults {
-    name: "core-all-defaults",
-    defaults: ["libcore_java_defaults"],
+// A target used to bootstrap compilation for the core library.
+// See core-all-system-modules for more details.
+java_library {
+    name: "core-all",
     visibility: [
         "//external/apache-harmony:__subpackages__",
         "//external/apache-xml",
@@ -159,13 +159,7 @@
         "//libcore/benchmarks",
         "//libcore/mmodules/intracoreapi",
     ],
-}
-
-// A target used to bootstrap compilation for the core library.
-// See core-all-system-modules for more details.
-java_library {
-    name: "core-all",
-    defaults: ["core-all-defaults"],
+    defaults: ["libcore_java_defaults"],
 
     srcs: [
         ":core_oj_java_files",
@@ -200,7 +194,6 @@
 // example to build core library tests, see "core-system-modules" instead.
 java_system_modules {
     name: "core-all-system-modules",
-    defaults: ["core-all-defaults"],
     libs: ["core-all"],
 }