Create src file provider in build/blueprint am: a992d06f60
Original change: https://android-review.googlesource.com/c/platform/build/blueprint/+/2854653 Change-Id: Idf8f6435270d1afbaef6759d99be34b843975235 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
commit
516ef4f48e
3 changed files with 10 additions and 0 deletions
|
@ -52,6 +52,7 @@ bootstrap_go_package {
|
|||
"provider.go",
|
||||
"scope.go",
|
||||
"singleton_ctx.go",
|
||||
"source_file_provider.go"
|
||||
],
|
||||
testSrcs: [
|
||||
"context_test.go",
|
||||
|
|
|
@ -337,6 +337,7 @@ func (g *GoPackage) GenerateBuildActions(ctx blueprint.ModuleContext) {
|
|||
|
||||
buildGoPackage(ctx, g.pkgRoot, g.properties.PkgPath, g.archiveFile,
|
||||
srcs, genSrcs)
|
||||
ctx.SetProvider(blueprint.SrcsFileProviderKey, blueprint.SrcsFileProviderData{SrcPaths: srcs})
|
||||
}
|
||||
|
||||
func (g *GoPackage) Srcs() []string {
|
||||
|
@ -533,6 +534,7 @@ func (g *GoBinary) GenerateBuildActions(ctx blueprint.ModuleContext) {
|
|||
Validations: validations,
|
||||
Optional: !g.properties.Default,
|
||||
})
|
||||
ctx.SetProvider(blueprint.SrcsFileProviderKey, blueprint.SrcsFileProviderData{SrcPaths: srcs})
|
||||
}
|
||||
|
||||
func buildGoPluginLoader(ctx blueprint.ModuleContext, pkgPath, pluginSrc string) bool {
|
||||
|
|
7
source_file_provider.go
Normal file
7
source_file_provider.go
Normal file
|
@ -0,0 +1,7 @@
|
|||
package blueprint
|
||||
|
||||
type SrcsFileProviderData struct {
|
||||
SrcPaths []string
|
||||
}
|
||||
|
||||
var SrcsFileProviderKey = NewProvider(SrcsFileProviderData{})
|
Loading…
Reference in a new issue