diff options
author | Colin Cross <ccross@android.com> | 2017-09-20 12:59:05 -0700 |
---|---|---|
committer | Colin Cross <ccross@android.com> | 2017-10-03 10:25:15 -0700 |
commit | 6af17aa0228ce589914f93d3b48183bb356e52e5 (patch) | |
tree | 67dff285d69b0b2f484022a601ea4e62833d1462 /android/proto.go | |
parent | 47ff2521c6479c44c5b7b0874948346b04c682df (diff) | |
download | build_soong-6af17aa0228ce589914f93d3b48183bb356e52e5.tar.gz build_soong-6af17aa0228ce589914f93d3b48183bb356e52e5.tar.bz2 build_soong-6af17aa0228ce589914f93d3b48183bb356e52e5.zip |
Add support for .proto files in java modules
Test: m -j checkbuild
Change-Id: Ia03429948baebff85164a91a34507866c97a08ef
Diffstat (limited to 'android/proto.go')
-rw-r--r-- | android/proto.go | 40 |
1 files changed, 0 insertions, 40 deletions
diff --git a/android/proto.go b/android/proto.go index 9bb9cfbb..1c70656e 100644 --- a/android/proto.go +++ b/android/proto.go @@ -14,22 +14,6 @@ package android -import ( - "github.com/google/blueprint" -) - -func init() { - pctx.HostBinToolVariable("protocCmd", "aprotoc") -} - -var ( - proto = pctx.AndroidStaticRule("protoc", - blueprint.RuleParams{ - Command: "$protocCmd $protoOut=$protoOutFlags:$outDir $protoFlags $in", - CommandDeps: []string{"$protocCmd"}, - }, "protoFlags", "protoOut", "protoOutFlags", "outDir") -) - // TODO(ccross): protos are often used to communicate between multiple modules. If the only // way to convert a proto to source is to reference it as a source file, and external modules cannot // reference source files in other modules, then every module that owns a proto file will need to @@ -38,30 +22,6 @@ var ( // and then external modules could depend on the proto module but use their own settings to // generate the source. -func GenProto(ctx ModuleContext, protoFile Path, - protoFlags string, protoOut, protoOutFlags string, extensions []string) WritablePaths { - - var outFiles WritablePaths - for _, ext := range extensions { - outFiles = append(outFiles, GenPathWithExt(ctx, "proto", protoFile, ext)) - } - - ctx.ModuleBuild(pctx, ModuleBuildParams{ - Rule: proto, - Description: "protoc " + protoFile.Rel(), - Outputs: outFiles, - Input: protoFile, - Args: map[string]string{ - "outDir": ProtoDir(ctx).String(), - "protoOut": protoOut, - "protoOutFlags": protoOutFlags, - "protoFlags": protoFlags, - }, - }) - - return outFiles -} - func ProtoFlags(ctx ModuleContext, p *ProtoProperties) []string { var protoFlags []string if len(p.Proto.Local_include_dirs) > 0 { |