diff options
author | Anton Hansson <hansson@google.com> | 2023-10-24 15:04:28 +0000 |
---|---|---|
committer | Anton Hansson <hansson@google.com> | 2023-11-01 10:18:07 +0000 |
commit | 14e7f959b5d9ce718c3a4c1b2d2b76ad9f448bd3 (patch) | |
tree | 2723e51526e0da726a117d41716fa0612501086f /Android.bp | |
parent | a595a54e2f5a75cc046364e70a36f5e567da46fe (diff) | |
download | base-14e7f959b5d9ce718c3a4c1b2d2b76ad9f448bd3.tar.gz |
Dedupe build rules for non-updatable sdk libs
Reuse the defaults in packages/modules/common that are for
non-updatable (to be updatable), but extend them to be suitable for
modules that have no intention of becoming updatable.
Baseline issues that were not enabled previously.
Bug: 306806877
Test: presubmit
Merged-In: I5b596821ce9c20d2504728bf01f4fdd69da9a94e
Change-Id: I5b596821ce9c20d2504728bf01f4fdd69da9a94e
Diffstat (limited to 'Android.bp')
-rw-r--r-- | Android.bp | 74 |
1 files changed, 10 insertions, 64 deletions
diff --git a/Android.bp b/Android.bp index 9c2b47184bdc..ed56fd87d5f6 100644 --- a/Android.bp +++ b/Android.bp @@ -735,90 +735,36 @@ stubs_defaults { // non_updatable_modules list in frameworks/base/api/api.go java_defaults { name: "framework-non-updatable-unbundled-defaults", - defaults: ["framework-non-updatable-lint-defaults"], - - sdk_version: "core_platform", - - // Api scope settings + defaults: [ + "framework-non-updatable-lint-defaults", + "non-updatable-framework-module-defaults", + ], public: { - enabled: true, - sdk_version: "module_current", libs: ["android_module_lib_stubs_current"], }, system: { - enabled: true, - sdk_version: "module_current", libs: ["android_module_lib_stubs_current"], }, module_lib: { - enabled: true, - sdk_version: "module_current", libs: ["android_module_lib_stubs_current"], }, test: { - enabled: true, - sdk_version: "test_frameworks_core_current", libs: ["android_test_frameworks_core_stubs_current"], }, - - stub_only_libs: [ - "framework-protos", - ], - impl_only_libs: [ - "framework-minus-apex-headers", // full access to framework-minus-apex including hidden API - "framework-annotations-lib", - ], - visibility: ["//visibility:public"], - stubs_library_visibility: ["//visibility:public"], - stubs_source_visibility: ["//visibility:private"], - impl_library_visibility: [ - ":__pkg__", - "//frameworks/base", - "//frameworks/base/api", // For framework-all - ], - defaults_visibility: [ - "//frameworks/base/location", - ], - plugins: [ - "error_prone_android_framework", - ], + sdk_version: "core_platform", + stub_only_libs: ["framework-protos"], + impl_only_libs: ["framework-minus-apex-headers"], // the framework, including hidden API + impl_library_visibility: ["//frameworks/base"], + defaults_visibility: ["//frameworks/base/location"], + plugins: ["error_prone_android_framework"], errorprone: { javacflags: [ "-Xep:AndroidFrameworkCompatChange:ERROR", "-Xep:AndroidFrameworkUid:ERROR", ], }, - // Include manual annotations in API txt files merge_annotations_dirs: ["metalava-manual"], - - // Use the source of annotations that affect metalava doc generation, since - // the relevant generation instructions are themselves in javadoc, which is - // not present in class files. - api_srcs: [":framework-metalava-annotations"], - - // Framework modules are not generally shared libraries, i.e. they are not - // intended, and must not be allowed, to be used in a <uses-library> manifest - // entry. - shared_library: false, - - // Prevent dependencies that do not specify an sdk_version from accessing the - // implementation library by default and force them to use stubs instead. - default_to_stubs: true, - - // Subdirectory for the artifacts that are copied to the dist directory - dist_group: "android", - - droiddoc_options: [ - "--error UnhiddenSystemApi " + - "--hide CallbackInterface " + - "--hide HiddenTypedefConstant " + - "--hide RequiresPermission " + - "--enhance-documentation " + - "--hide-package com.android.server ", - ], - - annotations_enabled: true, } build = [ |