diff options
Diffstat (limited to 'StubLibraries.bp')
| -rw-r--r-- | StubLibraries.bp | 38 |
1 files changed, 16 insertions, 22 deletions
diff --git a/StubLibraries.bp b/StubLibraries.bp index ef4e202fdfe2..a9e6e5af47f1 100644 --- a/StubLibraries.bp +++ b/StubLibraries.bp @@ -49,6 +49,7 @@ stubs_defaults { ":opt-net-voip-srcs", ":art-module-public-api-stubs-source", ":android_icu4j_public_api_files", + "**/package.html", ], // TODO(b/147699819): remove below aidl includes. aidl: { @@ -154,6 +155,9 @@ priv_apps = " " + module_libs = " " + " --show-annotation android.annotation.SystemApi\\(" + "client=android.annotation.SystemApi.Client.MODULE_LIBRARIES" + + "\\)" + + " --show-for-stub-purposes-annotation android.annotation.SystemApi\\(" + + "client=android.annotation.SystemApi.Client.PRIVILEGED_APPS" + "\\) " droidstubs { @@ -231,21 +235,19 @@ droidstubs { } ///////////////////////////////////////////////////////////////////// -// Following droidstubs modules are for extra APIs for modules. -// The framework currently have two more API surfaces for modules: -// @SystemApi(client=MODULE_APPS) and @SystemApi(client=MODULE_LIBRARIES) +// Following droidstubs modules are for extra APIs for modules, +// namely @SystemApi(client=MODULE_LIBRARIES) APIs. ///////////////////////////////////////////////////////////////////// -// TODO(b/146727827) remove the *-api module when we can teach metalava -// about the relationship among the API surfaces. Currently, these modules are only to generate -// the API signature files and ensure that the APIs evolve in a backwards compatible manner. -// They however are NOT used for building the API stub. - droidstubs { name: "module-lib-api", defaults: ["metalava-full-api-stubs-default"], arg_files: ["core/res/AndroidManifest.xml"], args: metalava_framework_docs_args + module_libs, + + // Do not generate stubs as they are not needed + generate_stubs: false, + check_api: { current: { api_file: "api/module-lib-current.txt", @@ -273,7 +275,7 @@ droidstubs { name: "module-lib-api-stubs-docs-non-updatable", defaults: ["metalava-non-updatable-api-stubs-default"], arg_files: ["core/res/AndroidManifest.xml"], - args: metalava_framework_docs_args + module_libs, + args: metalava_framework_docs_args + priv_apps + module_libs, check_api: { current: { api_file: "non-updatable-api/module-lib-current.txt", @@ -286,17 +288,6 @@ droidstubs { }, } -// The following droidstub module generates source files for the API stub library for -// modules. Note that it not only includes its own APIs but also other APIs that have -// narrower scope (all @SystemApis, not just the ones with 'client=MODULE_LIBRARIES'). - -droidstubs { - name: "module-lib-api-stubs-docs", - defaults: ["metalava-non-updatable-api-stubs-default"], - arg_files: ["core/res/AndroidManifest.xml"], - args: metalava_framework_docs_args + priv_apps + module_libs, -} - ///////////////////////////////////////////////////////////////////// // android_*_stubs_current modules are the stubs libraries compiled // from *-api-stubs-docs @@ -305,12 +296,15 @@ droidstubs { java_defaults { name: "android_defaults_stubs_current", libs: [ "stub-annotations" ], + static_libs: [ + // License notices from art module + "art-notices-for-framework-stubs-jar", + ], errorprone: { javacflags: [ "-XepDisableAllChecks", ], }, - java_resources: [":notices-for-framework-stubs"], sdk_version: "none", system_modules: "none", java_version: "1.8", @@ -386,7 +380,7 @@ java_library_static { java_library_static { name: "android_module_lib_stubs_current", - srcs: [ ":module-lib-api-stubs-docs" ], + srcs: [ ":module-lib-api-stubs-docs-non-updatable" ], defaults: ["android_defaults_stubs_current"], libs: ["sdk_system_29_android"], } |