From a114f9899cc4b53773c8abd17e62fd73ba2cc50f Mon Sep 17 00:00:00 2001 From: Paul Duffin Date: Tue, 25 Jan 2022 16:13:29 +0000 Subject: [PATCH 1/2] Merge annotations zip from conscrypt and i18n Previously, conscrypt and i18n were excluded from the list of modules from which combined_apis retrieved annotation zip files as they did not provide those files. They now provide those files so no longer need to be treated specially. Bug: 216435117 Test: m sdk-annotations.zip Change-Id: I6db85a44715362dfb288ddf9010e2289233acf78 --- api/api.go | 2 -- 1 file changed, 2 deletions(-) diff --git a/api/api.go b/api/api.go index aa9e399e7272..50db83e60a36 100644 --- a/api/api.go +++ b/api/api.go @@ -149,8 +149,6 @@ func createMergedStubsSrcjar(ctx android.LoadHookContext, modules []string) { // This produces the same annotations.zip as framework-doc-stubs, but by using // outputs from individual modules instead of all the source code. func createMergedAnnotations(ctx android.LoadHookContext, modules []string) { - // Conscrypt and i18n currently do not enable annotations - modules = removeAll(modules, []string{conscrypt, i18n}) props := genruleProps{} props.Name = proptools.StringPtr("sdk-annotations.zip") props.Tools = []string{"merge_annotation_zips", "soong_zip"} From 57533b4d8341023e3a6970434c33e9a19be9907b Mon Sep 17 00:00:00 2001 From: Paul Duffin Date: Tue, 25 Jan 2022 16:25:35 +0000 Subject: [PATCH 2/2] Merge system and module-lib APIs from conscrypt and i18n Previously, conscrypt and i18n were excluded from the list of modules from which combined_apis retrieved system and module-lib API files as they did not provide those files. They now provide those files so no longer need to be treated specially. The conscrypt and i18n (and art) are excluded from the framework-updatable-stubs-module_libs_api as that is used with a java_system_modules that already provides the conscrypt and i18n and art APIs. Bug: 216435117 Test: m all-modules-system-stubs m frameworks-base-api-system-current.txt m frameworks-base-api-module-lib-current.txt Change-Id: I58502249c59b1faa65fb288ac11becd9496ff37e --- api/api.go | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/api/api.go b/api/api.go index 50db83e60a36..17649e80e81a 100644 --- a/api/api.go +++ b/api/api.go @@ -27,7 +27,6 @@ import ( const art = "art.module.public.api" const conscrypt = "conscrypt.module.public.api" const i18n = "i18n.module.public.api" -var modules_with_only_public_scope = []string{i18n, conscrypt} // The intention behind this soong plugin is to generate a number of "merged" // API-related modules that would otherwise require a large amount of very @@ -193,11 +192,8 @@ func createMergedPublicStubs(ctx android.LoadHookContext, modules []string) { func createMergedSystemStubs(ctx android.LoadHookContext, modules []string) { props := libraryProps{} - modules_with_system_stubs := removeAll(modules, modules_with_only_public_scope) props.Name = proptools.StringPtr("all-modules-system-stubs") - props.Static_libs = append( - transformArray(modules_with_only_public_scope, "", ".stubs"), - transformArray(modules_with_system_stubs, "", ".stubs.system")...) + props.Static_libs = transformArray(modules, "", ".stubs.system") props.Sdk_version = proptools.StringPtr("module_current") props.Visibility = []string{"//frameworks/base"} ctx.CreateModule(java.LibraryFactory, &props) @@ -224,8 +220,6 @@ func createPublicStubsSourceFilegroup(ctx android.LoadHookContext, modules []str func createMergedTxts(ctx android.LoadHookContext, bootclasspath, system_server_classpath []string) { var textFiles []MergedTxtDefinition - // Two module libraries currently do not support @SystemApi so only have the public scope. - bcpWithSystemApi := removeAll(bootclasspath, modules_with_only_public_scope) tagSuffix := []string{".api.txt}", ".removed-api.txt}"} for i, f := range []string{"current.txt", "removed.txt"} { @@ -239,14 +233,14 @@ func createMergedTxts(ctx android.LoadHookContext, bootclasspath, system_server_ textFiles = append(textFiles, MergedTxtDefinition{ TxtFilename: f, BaseTxt: ":non-updatable-system-" + f, - Modules: bcpWithSystemApi, + Modules: bootclasspath, ModuleTag: "{.system" + tagSuffix[i], Scope: "system", }) textFiles = append(textFiles, MergedTxtDefinition{ TxtFilename: f, BaseTxt: ":non-updatable-module-lib-" + f, - Modules: bcpWithSystemApi, + Modules: bootclasspath, ModuleTag: "{.module-lib" + tagSuffix[i], Scope: "module-lib", })