Split intra core API into Conscrypt, ART, I18N modules

Extracts art_module_api_files filegroup from core_api_files to just
contain the files provided by the ART module.

Adds droidstubs and java_library definitions to generate the stubs
sources and compile them for each of the art, conscrypt and i18n
modules. Also adds a java_system_modules definition for art module
intra core api stubs to allow it to be used to build the i18n and
conscrypt libraries.

Removes generation of core-intra-stubs and instead builds
core.intra.stubs from the module specific libraries.

The art module reuses the API specification files (e.g.
mmodules/intracoreapi/api/intra/current-api.txt, the other modules
have their own directory.

The changes have been made in here to make reviewing easier. However,
the intent is that the i18n and conscrypt build rules and API
specification files will be moved to external/icu and
external/conscrypt respectively in a follow up change.

The core-libart-oj.depscheck build module has been modified to be
more consistent with core-all and consequently has to use the
i18n stubs source due to limitations with javac. A follow up change
will switch core-all over to build against i18n stubs source at which
point this will become unnecessary and will be removed.

Test: m checkbuild
Bug: 141935400
Change-Id: I8d820c0303614939ff8a042ba4f75511bebcdbe7
diff --git a/JavaLibrary.bp b/JavaLibrary.bp
index 8a6e5ae..1a6c6a9 100644
--- a/JavaLibrary.bp
+++ b/JavaLibrary.bp
@@ -125,24 +125,39 @@
     ],
 }
 
-// The set of files for the core library that have been marked up with @hide and
-// API-related annotations. Note that this includes the intra-core and
-// core-platform APIs as well as the public APIs.
-//
-// Some source files in :core_oj_api_files and :openjdk_mmodule_extra_files are
-// annotated by applying annotations to the .annotated.java stubs files in
-// ojluni/annotated/mmodules and rather than in the original source. See the comments
-// in openjdk_java_files.bp for more details.
+// The set of files for the core library that contribute to one or more API
+// surfaces. This includes files that are in the public API as well as those
+// that are not but which have been marked up with @hide plus one or more of
+// the API defining annotations.
 filegroup {
     name: "core_api_files",
     visibility: [
         "//libcore:__subpackages__",
     ],
     srcs: [
+        ":art_module_api_files",
         ":android_icu4j_src_files",
+        ":conscrypt_java_files",
+    ],
+}
+
+// The set of files for the ART module that contribute to one or more API
+// surfaces. This includes files that are in the public API as well as those
+// that are not but which have been marked up with @hide plus one or more of
+// the API defining annotations.
+//
+// Some source files in :core_oj_api_files and :openjdk_mmodule_extra_files are
+// annotated by applying annotations to the .annotated.java stubs files in
+// ojluni/annotated/mmodules and rather than in the original source. See the comments
+// in openjdk_java_files.bp for more details.
+filegroup {
+    name: "art_module_api_files",
+    visibility: [
+        "//libcore:__subpackages__",
+    ],
+    srcs: [
         ":apache-xml_api_files",
         ":bouncycastle_java_files",
-        ":conscrypt_java_files",
         ":core_oj_api_files",
         ":core_libart_api_files",
         ":okhttp_api_files",