summaryrefslogtreecommitdiff
path: root/api/api.go
diff options
context:
space:
mode:
author Cole Faust <colefaust@google.com> 2024-10-22 16:30:57 -0700
committer Cole Faust <colefaust@google.com> 2024-10-22 16:33:35 -0700
commit5aeb9fd4d89e9ee3911fc61b29a6b04d693734ed (patch)
tree0ebe58916155129fff486698b06bc94b4ea72fd6 /api/api.go
parent397dfb6e026e3a00167168d5bef7903fddc32082 (diff)
Remove dependencies on the 1-variant fallback
When adding a dependencies, if the variants don't match, but the dependency only has 1 variant anyways, soong will always use that variant. This makes it hard to add new variants to soong, because the 1-variant fallback stops being used and you start getting missing variant errors. Make changes to bp files such that all dependencies correctly specify the variant to use. Bug: 372091092 Flag: EXEMPT refactor Test: m nothing Change-Id: I305d9a549fc132c3d14f56eae1abbac1b9defd10
Diffstat (limited to 'api/api.go')
-rw-r--r--api/api.go14
1 files changed, 7 insertions, 7 deletions
diff --git a/api/api.go b/api/api.go
index 1bbf3709480a..29083dfc8968 100644
--- a/api/api.go
+++ b/api/api.go
@@ -20,7 +20,6 @@ import (
"github.com/google/blueprint/proptools"
"android/soong/android"
- "android/soong/genrule"
"android/soong/java"
)
@@ -138,9 +137,10 @@ type libraryProps struct {
}
type fgProps struct {
- Name *string
- Srcs proptools.Configurable[[]string]
- Visibility []string
+ Name *string
+ Srcs proptools.Configurable[[]string]
+ Device_common_srcs proptools.Configurable[[]string]
+ Visibility []string
}
type defaultsProps struct {
@@ -201,7 +201,7 @@ func createMergedTxt(ctx android.LoadHookContext, txt MergedTxtDefinition, stubs
}
}
props.Visibility = []string{"//visibility:public"}
- ctx.CreateModule(genrule.GenRuleFactory, &props)
+ ctx.CreateModule(java.GenRuleFactory, &props)
}
func createMergedAnnotationsFilegroups(ctx android.LoadHookContext, modules, system_server_modules proptools.Configurable[[]string]) {
@@ -230,7 +230,7 @@ func createMergedAnnotationsFilegroups(ctx android.LoadHookContext, modules, sys
} {
props := fgProps{}
props.Name = proptools.StringPtr(i.name)
- props.Srcs = createSrcs(i.modules, i.tag)
+ props.Device_common_srcs = createSrcs(i.modules, i.tag)
ctx.CreateModule(android.FileGroupFactory, &props)
}
}
@@ -429,7 +429,7 @@ func createMergedFrameworkSystemServerExportableStubs(ctx android.LoadHookContex
func createPublicStubsSourceFilegroup(ctx android.LoadHookContext, modules proptools.Configurable[[]string]) {
props := fgProps{}
props.Name = proptools.StringPtr("all-modules-public-stubs-source")
- props.Srcs = createSrcs(modules, "{.public.stubs.source}")
+ props.Device_common_srcs = createSrcs(modules, "{.public.stubs.source}")
props.Visibility = []string{"//frameworks/base"}
ctx.CreateModule(android.FileGroupFactory, &props)
}