Unbundle i18n API from frameworks/base
Bug: 174344410
Test: lunch sdk-eng && m dist sdk
Run above before and after this change to ensure that the
runtime-i18n stubs jar and API specification file (but not the
removed API specification file) are copied to the dist.
Also, added a new method to the
prebuilts/sdk/30/public/api/runtime-i18n.txt and run m checkapi
to ensure that incompatible changes between the latest released
API and the current API are detected properly.
Change-Id: I0eb01cb830d653b9e542f8b4f8eabde57ee34c6b
diff --git a/android_icu4j/Android.bp b/android_icu4j/Android.bp
index c910983..369457e 100644
--- a/android_icu4j/Android.bp
+++ b/android_icu4j/Android.bp
@@ -26,9 +26,6 @@
//==========================================================
filegroup {
name: "android_icu4j_public_api_files",
- visibility: [
- "//frameworks/base",
- ],
srcs: [
":android_icu4j_repackaged_src_files",
],
@@ -146,6 +143,8 @@
java_sdk_library {
name: "i18n.module.public.api",
visibility: [
+ "//frameworks/base",
+ "//frameworks/base/api",
"//libcore",
"//packages/modules/RuntimeI18n/apex",
// Visibility for prebuilt i18n-module-sdk from the prebuilt of
@@ -167,24 +166,12 @@
sdk_version: "none",
system_modules: "art-module-public-api-stubs-system-modules",
- // Don't copy any output files to the dist.
- no_dist: true,
-}
-
-// Referenced implicitly from i18n.module.intra.api.
-filegroup {
- name: "i18n.module.intra.api.api.public.latest",
- srcs: [
- "api/intra/last-api.txt",
- ],
-}
-
-// Referenced implicitly from i18n.module.intra.api.
-filegroup {
- name: "i18n.module.intra.api-removed.api.public.latest",
- srcs: [
- "api/intra/last-removed.txt",
- ],
+ // The base name for the artifacts that are automatically published to the
+ // dist and which end up in one of the sub-directories of prebuilts/sdk.
+ // As long as this matches the name of the artifacts in prebuilts/sdk then
+ // the API will be checked for compatibility against the latest released
+ // version of the API.
+ dist_stem: "runtime-i18n",
}
// Generates stub source files for the intra-core API of the I18N module.