Add bootclasspath_fragment.

Note that the contents of the bootclasspath_fragment are added as
dependencies to an apex, so there is no need to duplicate them in
java_libs.

Contents of the bootclasspath_fragment are jars that are listed
in PRODUCT_UPDATABLE_BOOT_JARS in make. The module modularizes
the treatment of said jars at build time (e.g. follow up changes
could add hidden api bits to this module if needed).

This module is also responsible for generating classpaths.proto
config for the apex which feeds the information about boot jars
it contributes to BOOTCLASSPATH at runtime.

Bug: 180105615
Test: atest CtsClasspathsTestCases
Ignore-AOSP-First: manual cp to avoid merging into mainline-prod
Change-Id: Idba141b6dba3c79768c63a0f16b7c584f8d71a9a
diff --git a/Android.bp b/Android.bp
index 4ce6646..d694623 100644
--- a/Android.bp
+++ b/Android.bp
@@ -20,11 +20,11 @@
 apex {
     name: "com.android.sdkext",
     defaults: [ "com.android.sdkext-defaults" ],
+    bootclasspath_fragments: ["com.android.sdkext-bootclasspath-fragment"],
     binaries: [
         "derive_classpath",
         "derive_sdk",
     ],
-    java_libs: [ "framework-sdkextensions" ],
     prebuilts: [
         "cur_sdkinfo",
         "extensions_db",
@@ -60,3 +60,10 @@
     name: "sdkextensions-sdk",
     java_sdk_libs: ["framework-sdkextensions"],
 }
+
+// Encapsulate the contributions made by the com.android.sdkext to the bootclasspath.
+bootclasspath_fragment {
+    name: "com.android.sdkext-bootclasspath-fragment",
+    contents: ["framework-sdkextensions"],
+    apex_available: ["com.android.sdkext"],
+}