diff options
author | 2020-08-29 01:17:45 -0700 | |
---|---|---|
committer | 2020-08-29 01:17:45 -0700 | |
commit | 65cb5c69ea5c6134b8c6bad09242f7d7ca52d9e8 (patch) | |
tree | f7c3529e7aff1c8cb4d8fa55ec6f6bdeae5821d3 /java/sdk_library.go | |
parent | bca691b377e683becf4098683a91091cfc10c9f5 (diff) | |
parent | d786b6bffece20ecff5c387a41ba5d82ded29759 (diff) |
Merge Android R (rvc-dev-plus-aosp-without-vendor@6692709)
Bug: 166295507
Merged-In: Ifca7b65f4e27bf14cdc30f72f790b0de90130bae
Change-Id: I3a39be5f0b8736de4822c6a14072c78d4e4ad89d
Diffstat (limited to 'java/sdk_library.go')
-rw-r--r-- | java/sdk_library.go | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/java/sdk_library.go b/java/sdk_library.go index a5db56c2b..30478a1fb 100644 --- a/java/sdk_library.go +++ b/java/sdk_library.go @@ -419,6 +419,9 @@ type sdkLibraryProperties struct { // $(location <label>): the path to the droiddoc_option_files with name <label> Droiddoc_options []string + // is set to true, Metalava will allow framework SDK to contain annotations. + Annotations_enabled *bool + // a list of top-level directories containing files to merge qualifier annotations // (i.e. those intended to be included in the stubs written) from. Merge_annotations_dirs []string @@ -1159,6 +1162,11 @@ 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 + // 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) { + props.Libs = append(props.Libs, "stub-annotations") + } props.Openjdk9.Srcs = module.properties.Openjdk9.Srcs props.Openjdk9.Javacflags = module.properties.Openjdk9.Javacflags // We compile the stubs for 1.8 in line with the main android.jar stubs, and potential @@ -1193,6 +1201,7 @@ func (module *SdkLibrary) createStubsSourcesAndApi(mctx android.DefaultableHookC Arg_files []string Args *string Java_version *string + Annotations_enabled *bool Merge_annotations_dirs []string Merge_inclusion_annotations_dirs []string Generate_stubs *bool @@ -1243,6 +1252,7 @@ func (module *SdkLibrary) createStubsSourcesAndApi(mctx android.DefaultableHookC props.Aidl.Local_include_dirs = module.deviceProperties.Aidl.Local_include_dirs props.Java_version = module.properties.Java_version + props.Annotations_enabled = module.sdkLibraryProperties.Annotations_enabled props.Merge_annotations_dirs = module.sdkLibraryProperties.Merge_annotations_dirs props.Merge_inclusion_annotations_dirs = module.sdkLibraryProperties.Merge_inclusion_annotations_dirs |