diff options
author | 2021-04-21 16:30:10 +0100 | |
---|---|---|
committer | 2021-04-22 10:20:13 +0100 | |
commit | dae54cd84fff352cd1479314758cfd077da79e16 (patch) | |
tree | d06b994d32f468781c10cebab6e8986add1c2b34 /java/sdk_library.go | |
parent | b21166e236e757fb1cd3db648fbc034a51817fef (diff) |
Add new stub_only_static_libs attr for sdk_library
Allow java_sdk_libraries to include libraries statically into their
stubs. The immediate use-case of this is to embed libcore notice files
into their stubs.
Also extend the java_sdk_library tests for impl/stub-only-libs, plus
some not assert utils.
Bug: 173186484
Bug: 184839599
Test: soong tests
Change-Id: I1ebf2f35c048eab5cec5125482a0304fe660f188
Diffstat (limited to 'java/sdk_library.go')
-rw-r--r-- | java/sdk_library.go | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/java/sdk_library.go b/java/sdk_library.go index 223be5cf7..05ce97aea 100644 --- a/java/sdk_library.go +++ b/java/sdk_library.go @@ -399,6 +399,9 @@ type sdkLibraryProperties struct { // List of Java libraries that will be in the classpath when building stubs Stub_only_libs []string `android:"arch_variant"` + // List of Java libraries that will included in stub libraries + Stub_only_static_libs []string `android:"arch_variant"` + // list of package names that will be documented and publicized as API. // This allows the API to be restricted to a subset of the source files provided. // If this is unspecified then all the source files will be treated as being part @@ -1275,6 +1278,7 @@ func (module *SdkLibrary) createStubsLibrary(mctx android.DefaultableHookContext System_modules *string Patch_module *string Libs []string + Static_libs []string Compile_dex *bool Java_version *string Openjdk9 struct { @@ -1299,6 +1303,7 @@ func (module *SdkLibrary) createStubsLibrary(mctx android.DefaultableHookContext props.Patch_module = module.properties.Patch_module props.Installable = proptools.BoolPtr(false) props.Libs = module.sdkLibraryProperties.Stub_only_libs + props.Static_libs = module.sdkLibraryProperties.Stub_only_static_libs // The stub-annotations library contains special versions of the annotations // with CLASS retention policy, so that they're kept. if proptools.Bool(module.sdkLibraryProperties.Annotations_enabled) { |