Merge "Convert merged srcjar rule to Android.bp"

This commit is contained in:
Anton Hansson
2023-02-16 14:36:19 +00:00
committed by Gerrit Code Review
2 changed files with 12 additions and 13 deletions

View File

@@ -178,6 +178,18 @@ genrule {
"$(location :frameworks-base-api-module-lib-current.txt)", "$(location :frameworks-base-api-module-lib-current.txt)",
} }
genrule {
name: "frameworks-base-api-current.srcjar",
tools: ["merge_zips"],
out: ["current.srcjar"],
cmd: "$(location merge_zips) $(out) $(in)",
srcs: [
":api-stubs-docs-non-updatable",
":all-modules-public-stubs-source",
],
visibility: ["//visibility:private"], // Used by make module in //development, mind
}
// This produces the same annotations.zip as framework-doc-stubs, but by using // This produces the same annotations.zip as framework-doc-stubs, but by using
// outputs from individual modules instead of all the source code. // outputs from individual modules instead of all the source code.
genrule_defaults { genrule_defaults {

View File

@@ -147,17 +147,6 @@ func createMergedTxt(ctx android.LoadHookContext, txt MergedTxtDefinition) {
ctx.CreateModule(genrule.GenRuleFactory, &props) ctx.CreateModule(genrule.GenRuleFactory, &props)
} }
func createMergedStubsSrcjar(ctx android.LoadHookContext, modules []string) {
props := genruleProps{}
props.Name = proptools.StringPtr(ctx.ModuleName() + "-current.srcjar")
props.Tools = []string{"merge_zips"}
props.Out = []string{"current.srcjar"}
props.Cmd = proptools.StringPtr("$(location merge_zips) $(out) $(in)")
props.Srcs = append([]string{":api-stubs-docs-non-updatable"}, createSrcs(modules, "{.public.stubs.source}")...)
props.Visibility = []string{"//visibility:private"} // Used by make module in //development, mind
ctx.CreateModule(genrule.GenRuleFactory, &props)
}
func createMergedAnnotationsFilegroups(ctx android.LoadHookContext, modules, system_server_modules []string) { func createMergedAnnotationsFilegroups(ctx android.LoadHookContext, modules, system_server_modules []string) {
for _, i := range []struct{ for _, i := range []struct{
name string name string
@@ -382,8 +371,6 @@ func (a *CombinedApis) createInternalModules(ctx android.LoadHookContext) {
} }
createMergedTxts(ctx, bootclasspath, system_server_classpath) createMergedTxts(ctx, bootclasspath, system_server_classpath)
createMergedStubsSrcjar(ctx, bootclasspath)
createMergedPublicStubs(ctx, bootclasspath) createMergedPublicStubs(ctx, bootclasspath)
createMergedSystemStubs(ctx, bootclasspath) createMergedSystemStubs(ctx, bootclasspath)
createMergedTestStubsForNonUpdatableModules(ctx) createMergedTestStubsForNonUpdatableModules(ctx)