diff options
| author | 2022-06-24 19:33:38 +0000 | |
|---|---|---|
| committer | 2022-06-24 19:33:38 +0000 | |
| commit | d4b424edebc02df2bcc5fe2172a7047175369617 (patch) | |
| tree | 860eb8d023c3500e8b4f73f4250376b11612e800 /api | |
| parent | cc4630cdbfdee1fca83d366c8525ddcd257f36b7 (diff) | |
| parent | 6ca396706df0c7a19c2b0161108d997c2aa889d2 (diff) | |
Merge "Refactor merged annotations creation" am: 24f473395d am: 6ca396706d
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2132125
Change-Id: I42b2f8b7e4bfbee7077a658753304af0debbf4b9
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
Diffstat (limited to 'api')
| -rw-r--r-- | api/Android.bp | 17 | ||||
| -rw-r--r-- | api/api.go | 18 |
2 files changed, 23 insertions, 12 deletions
diff --git a/api/Android.bp b/api/Android.bp index 89993e751cf0..72ac427380e6 100644 --- a/api/Android.bp +++ b/api/Android.bp @@ -193,6 +193,23 @@ genrule { "$(location :frameworks-base-api-module-lib-current.txt)", } +// This produces the same annotations.zip as framework-doc-stubs, but by using +// outputs from individual modules instead of all the source code. +genrule { + name: "sdk-annotations.zip", + srcs: [ + ":android-non-updatable-doc-stubs{.annotations.zip}", + ":all-modules-public-annotations", + ], + out: ["annotations.zip"], + tools: [ + "merge_annotation_zips", + "soong_zip", + ], + cmd: "$(location merge_annotation_zips) $(genDir)/out $(in) && " + + "$(location soong_zip) -o $(out) -C $(genDir)/out -D $(genDir)/out", +} + genrule { name: "combined-removed-dex", visibility: [ diff --git a/api/api.go b/api/api.go index ca0fc28cdb9d..a0d066ad5b58 100644 --- a/api/api.go +++ b/api/api.go @@ -148,17 +148,11 @@ func createMergedStubsSrcjar(ctx android.LoadHookContext, modules []string) { ctx.CreateModule(genrule.GenRuleFactory, &props) } -// 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) { - props := genruleProps{} - props.Name = proptools.StringPtr("sdk-annotations.zip") - props.Tools = []string{"merge_annotation_zips", "soong_zip"} - props.Out = []string{"annotations.zip"} - props.Cmd = proptools.StringPtr("$(location merge_annotation_zips) $(genDir)/out $(in) && " + - "$(location soong_zip) -o $(out) -C $(genDir)/out -D $(genDir)/out") - props.Srcs = append([]string{":android-non-updatable-doc-stubs{.annotations.zip}"}, createSrcs(modules, "{.public.annotations.zip}")...) - ctx.CreateModule(genrule.GenRuleFactory, &props) +func createMergedPublicAnnotationsFilegroup(ctx android.LoadHookContext, modules []string) { + props := fgProps{} + props.Name = proptools.StringPtr("all-modules-public-annotations") + props.Srcs = createSrcs(modules, "{.public.annotations.zip}") + ctx.CreateModule(android.FileGroupFactory, &props) } func createFilteredApiVersions(ctx android.LoadHookContext, modules []string) { @@ -291,7 +285,7 @@ func (a *CombinedApis) createInternalModules(ctx android.LoadHookContext) { createMergedFrameworkModuleLibStubs(ctx, bootclasspath) createMergedFrameworkImpl(ctx, bootclasspath) - createMergedAnnotations(ctx, bootclasspath) + createMergedPublicAnnotationsFilegroup(ctx, bootclasspath) createFilteredApiVersions(ctx, bootclasspath) |