Move ICU's public api stubs to java_sdk_library.

Test: m
Bug: 157734636
Change-Id: I9b2834d39d8d4c9e775b85ed01950ec2b98bd0a2
diff --git a/android_icu4j/Android.bp b/android_icu4j/Android.bp
index c5edf41..808a363 100644
--- a/android_icu4j/Android.bp
+++ b/android_icu4j/Android.bp
@@ -109,32 +109,27 @@
     dxflags: ["--core-library"],
 }
 
-// Generates stubs for the parts of the public SDK API provided by the i18n module.
-//
-// Only for use by i18n.module.public.api.stubs target below.
-droidstubs {
-    name: "i18n-module-public-api-stubs-gen",
+java_sdk_library {
+    name: "i18n.module.public.api",
+    visibility: [
+        "//libcore",
+        "//packages/modules/RuntimeI18n/apex",
+        // Visibility for prebuilt i18n-module-sdk from the prebuilt of
+        // this module.
+        // TODO(b/155921753): Restrict this when prebuilts are in their proper
+        // locations.
+        "//prebuilts:__subpackages__",
+    ],
     srcs: [
         ":android_icu4j_public_api_files",
     ],
-    java_version: "1.9",
-    installable: false,
-    sdk_version: "none",
-    system_modules: "art-module-public-api-stubs-system-modules",
-}
-
-// A stubs target containing the parts of the public SDK API provided by the i18n module.
-java_library {
-    name: "i18n.module.public.api.stubs",
-    visibility: [
-        "//libcore",
-    ],
-    srcs: [":i18n-module-public-api-stubs-gen"],
     errorprone: {
         javacflags: [
             "-Xep:MissingOverride:OFF",
         ],
     },
+    api_dir: "api/public",
+    api_only: true,
     sdk_version: "none",
     system_modules: "art-module-public-api-stubs-system-modules",
 }