From 70882b5a56b2897965fee57ff32169af63b4e2f0 Mon Sep 17 00:00:00 2001 From: Anton Hansson Date: Tue, 18 Aug 2020 12:52:51 +0100 Subject: More default visibility for framework modules Stub libraries are public. Stub sources and impl library are not. Bug: 149906971 Test: m nothing Change-Id: Iadb1c8ba021aa5225d4f5ea13388e843ff846eaa --- apex/Android.bp | 19 ++++++------------- 1 file changed, 6 insertions(+), 13 deletions(-) diff --git a/apex/Android.bp b/apex/Android.bp index 6eaf89c58965..74db82825e6a 100644 --- a/apex/Android.bp +++ b/apex/Android.bp @@ -101,20 +101,13 @@ java_defaults { annotations_enabled: true, - stubs_library_visibility: [ - "//visibility:public", - ], - - // 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", + // Allow access to the stubs from anywhere + visibility: ["//visibility:public"], + stubs_library_visibility: ["//visibility:public"], - // Currently, the stub source is not required for anything other than building - // the stubs library so is private to avoid misuse. - "//visibility:private", - ], + // Hide impl library and stub sources + impl_library_visibility: [":__package__"], + stubs_source_visibility: ["//visibility:private"], // Collates API usages from each module for further analysis. plugins: ["java_api_finder"], -- cgit v1.2.3-59-g8ed1b