diff options
author | 2021-06-21 14:08:08 +0100 | |
---|---|---|
committer | 2021-06-24 22:04:09 +0100 | |
commit | b51db2ed8eb3bf528e6914dd0720ee6d2ef54ee1 (patch) | |
tree | 2356e2e55986417bfdbade7600b3902f483f6134 /java | |
parent | 48b67415108db83f26a16a80ad60fab5c6cfdb84 (diff) |
Add ModuleLibHiddenAPIScope for hidden API processing
Although the hidden API runtime does not support a module-lib API flag
the hidden API processing does need to used them as they are needed by
the "hiddenapi list" tool for any bootclasspath_fragment module whose
contents builds against an sdk_version of "module_current". Without it
the "hiddenapi list" tool could fail to resolve references to classes
provided by other modules which would break the build.
Bug: 179354495
Test: m out/soong/hiddenapi/hiddenapi-flags.csv
- make sure that this change has no effect on the generated flags.
Change-Id: I3ecb80fdaeba0e66d1ee25cb57152ab546d9bfe0
Diffstat (limited to 'java')
-rw-r--r-- | java/hiddenapi_modular.go | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/java/hiddenapi_modular.go b/java/hiddenapi_modular.go index 66f4fe714..96534ad7d 100644 --- a/java/hiddenapi_modular.go +++ b/java/hiddenapi_modular.go @@ -64,6 +64,10 @@ var ( sdkKind: android.SdkTest, hiddenAPIListOption: "--test-stub-classpath", }) + ModuleLibHiddenAPIScope = initHiddenAPIScope(&HiddenAPIScope{ + name: "module-lib", + sdkKind: android.SdkModule, + }) CorePlatformHiddenAPIScope = initHiddenAPIScope(&HiddenAPIScope{ name: "core-platform", sdkKind: android.SdkCorePlatform, @@ -76,19 +80,20 @@ var ( // These are roughly in order from narrowest API surface to widest. Widest means the API stubs // with the biggest API surface, e.g. test is wider than system is wider than public. // - // Core platform is considered wider than system because those modules that provide core platform - // APIs either do not have any system APIs at all, or if they do it is because the core platform - // API is being converted to system APIs. In either case the system API is a subset of core - // platform API. + // Core platform is considered wider than system/module-lib because those modules that provide + // core platform APIs either do not have any system/module-lib APIs at all, or if they do it is + // because the core platform API is being converted to system/module-lib APIs. In either case the + // system/module-lib APIs are subsets of the core platform API. // // This is not strictly in order from narrowest to widest as the Test API is wider than system but - // is neither wider or narrower than the core platform API. However, this works well enough at the - // moment. + // is neither wider or narrower than the module-lib or core platform APIs. However, this works + // well enough at the moment. // TODO(b/191644675): Correctly reflect the sub/superset relationships between APIs. hiddenAPIScopes = []*HiddenAPIScope{ PublicHiddenAPIScope, SystemHiddenAPIScope, TestHiddenAPIScope, + ModuleLibHiddenAPIScope, CorePlatformHiddenAPIScope, } @@ -100,6 +105,7 @@ var ( PublicHiddenAPIScope, SystemHiddenAPIScope, TestHiddenAPIScope, + ModuleLibHiddenAPIScope, } // The HiddenAPIScope instances that are supported by the `hiddenapi list`. |