Create src file provider in build/blueprint
Change-Id: I7091effe7791c1f3ea57e775b37cd72f4ee13d03
This commit is contained in:
parent
02d2b9e4cc
commit
a992d06f60
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