diff options
author | Colin Cross <ccross@android.com> | 2019-03-28 19:30:56 -0700 |
---|---|---|
committer | Colin Cross <ccross@android.com> | 2019-04-02 16:38:55 +0000 |
commit | fe17f6f0e825b42542b4527c19cdd7b520ca5133 (patch) | |
tree | 496b65489ee342024f22129edd4ad98e21ac1f33 /genrule | |
parent | 19878da6a062ef474a1c905f48b1efb986862050 (diff) | |
download | build_soong-fe17f6f0e825b42542b4527c19cdd7b520ca5133.tar.gz build_soong-fe17f6f0e825b42542b4527c19cdd7b520ca5133.tar.bz2 build_soong-fe17f6f0e825b42542b4527c19cdd7b520ca5133.zip |
Add support for protoc plugins
Add a proto.plugin property to allow specifying a custom protoc
plugin to generate the code.
Fixes: 70706119
Test: m am StreamingProtoTest
Change-Id: I1ecdd346284b42bbcc8297019d98d2cd564eb94c
Diffstat (limited to 'genrule')
-rw-r--r-- | genrule/genrule.go | 6 | ||||
-rw-r--r-- | genrule/genrule_test.go | 2 |
2 files changed, 5 insertions, 3 deletions
diff --git a/genrule/genrule.go b/genrule/genrule.go index 32acd8c8..e259b1d9 100644 --- a/genrule/genrule.go +++ b/genrule/genrule.go @@ -49,8 +49,10 @@ type SourceFileGenerator interface { GeneratedDeps() android.Paths } +// Alias for android.HostToolProvider +// Deprecated: use android.HostToolProvider instead. type HostToolProvider interface { - HostToolPath() android.OptionalPath + android.HostToolProvider } type hostToolDependencyTag struct { @@ -193,7 +195,7 @@ func (g *Module) GenerateAndroidBuildActions(ctx android.ModuleContext) { tool := ctx.OtherModuleName(module) var path android.OptionalPath - if t, ok := module.(HostToolProvider); ok { + if t, ok := module.(android.HostToolProvider); ok { if !t.(android.Module).Enabled() { if ctx.Config().AllowMissingDependencies() { ctx.AddMissingDependencies([]string{tool}) diff --git a/genrule/genrule_test.go b/genrule/genrule_test.go index 19b22f76..5cb51b8b 100644 --- a/genrule/genrule_test.go +++ b/genrule/genrule_test.go @@ -527,4 +527,4 @@ func (t *testTool) HostToolPath() android.OptionalPath { return android.OptionalPathForPath(t.outputFile) } -var _ HostToolProvider = (*testTool)(nil) +var _ android.HostToolProvider = (*testTool)(nil) |