diff options
author | Paul Duffin <paulduffin@google.com> | 2021-02-12 11:46:42 +0000 |
---|---|---|
committer | Paul Duffin <paulduffin@google.com> | 2021-02-16 13:28:26 +0000 |
commit | 031d8693b3dae7edaca2e5fef3d017ac2e67424d (patch) | |
tree | 496cc3cd5c3166c0b4c048fe7e66e5833e46a93a /java/java.go | |
parent | 7ad17bdad5b613d483d4f77d3c7637c407904211 (diff) |
Allow explicitly specified additional annotations for hiddenapi
Adds the hiddenapi_additional_annotations to allow a library to list
the libraries that provided additional hiddenapi related annotations
for a library.
Modifies merge_csv.py so it can process multiple zip files at the same
time and uses that to merge the embedded .uau files from a module and
those it depends upon.
Bug: 180102243
Test: m droid
Verified that hiddenapi files (both aggregated ones and for the
individual modules) are not affected by this change.
Change-Id: I796520021c7357398a9e2a09f1029e4a578b05b3
Diffstat (limited to 'java/java.go')
-rw-r--r-- | java/java.go | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/java/java.go b/java/java.go index 338140bbf..e14815e92 100644 --- a/java/java.go +++ b/java/java.go @@ -298,6 +298,9 @@ type CompilerProperties struct { // If true, package the kotlin stdlib into the jar. Defaults to true. Static_kotlin_stdlib *bool `android:"arch_variant"` + + // A list of java_library instances that provide additional hiddenapi annotations for the library. + Hiddenapi_additional_annotations []string } type CompilerDeviceProperties struct { @@ -840,6 +843,9 @@ func (j *Module) deps(ctx android.BottomUpMutatorContext) { libDeps := ctx.AddVariationDependencies(nil, libTag, rewriteSyspropLibs(j.properties.Libs, "libs")...) ctx.AddVariationDependencies(nil, staticLibTag, rewriteSyspropLibs(j.properties.Static_libs, "static_libs")...) + // Add dependency on libraries that provide additional hidden api annotations. + ctx.AddVariationDependencies(nil, hiddenApiAnnotationsTag, j.properties.Hiddenapi_additional_annotations...) + if ctx.DeviceConfig().VndkVersion() != "" && ctx.Config().EnforceInterPartitionJavaSdkLibrary() { // Require java_sdk_library at inter-partition java dependency to ensure stable // interface between partitions. If inter-partition java_library dependency is detected, |