diff options
| author | Paul Duffin <paulduffin@google.com> | 2020-05-15 15:48:25 +0000 |
|---|---|---|
| committer | Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> | 2020-05-15 15:48:25 +0000 |
| commit | 43f7ff4fa2f905ccfbb1417d2c1a1c5c07960c38 (patch) | |
| tree | 4b9747b28378c561a1db077edefc8ed9679d642c /apex/Android.bp | |
| parent | d82309a9346d0c14c7e042cc8deabcfee172f956 (diff) | |
| parent | bee7404dccbde59077a34d4bcfaab5ada4344617 (diff) | |
Add framework-module-defaults for java_sdk_library am: bee7404dcc
Change-Id: I4fd4eb00ab4a3283e1f6592294a11249dec4e071
Diffstat (limited to 'apex/Android.bp')
| -rw-r--r-- | apex/Android.bp | 54 |
1 files changed, 54 insertions, 0 deletions
diff --git a/apex/Android.bp b/apex/Android.bp index d59cd6355af9..7c2afa7bf841 100644 --- a/apex/Android.bp +++ b/apex/Android.bp @@ -63,6 +63,60 @@ mainline_service_stubs_args = "--hide-annotation android.annotation.Hide " + "--hide InternalClasses " // com.android.* classes are okay in this interface +// Defaults for mainline module provided java_sdk_library instances. +java_defaults { + name: "framework-module-defaults", + + // Additional annotations used for compiling both the implementation and the + // stubs libraries. + libs: ["framework-annotations-lib"], + + // Enable api lint. This will eventually become the default for java_sdk_library + // but it cannot yet be turned on because some usages have not been cleaned up. + // TODO(b/156126315) - Remove when no longer needed. + api_lint: { + enabled: true, + }, + + // The API scope specific properties. + public: { + enabled: true, + sdk_version: "module_current", + }, + system: { + enabled: true, + sdk_version: "module_current", + }, + module_lib: { + enabled: true, + sdk_version: "module_current", + }, + + // The stub libraries must be visible to frameworks/base so they can be combined + // into API specific libraries. + stubs_library_visibility: [ + "//frameworks/base", // Framework + ], + + // Set the visibility of the modules creating the stubs source. + stubs_source_visibility: [ + // Ignore any visibility rules specified on the java_sdk_library when + // setting the visibility of the stubs source modules. + "//visibility:override", + + // Currently, the stub source is not required for anything other than building + // the stubs library so is private to avoid misuse. + "//visibility:private", + ], + + // Collates API usages from each module for further analysis. + plugins: ["java_api_finder"], + + // Mainline modules should only rely on 'module_lib' APIs provided by other modules + // and the non updatable parts of the platform. + sdk_version: "module_current", +} + stubs_defaults { name: "framework-module-stubs-defaults-publicapi", args: mainline_framework_stubs_args, |
