Fix proto flags in java

am: d5dbfb78a0

Change-Id: I656802ef2bd4894b5bda331476f43da05d75496d
This commit is contained in:
Colin Cross 2017-11-17 21:37:08 +00:00 committed by android-build-merger
commit dbe0ca5a79
2 changed files with 8 additions and 3 deletions

View file

@ -186,7 +186,7 @@ type javaBuilderFlags struct {
kotlincFlags string
kotlincClasspath classpath
protoFlags string
protoFlags []string
protoOutFlag string
}

View file

@ -15,6 +15,8 @@
package java
import (
"strings"
"github.com/google/blueprint"
"github.com/google/blueprint/proptools"
@ -39,7 +41,7 @@ var (
)
func genProto(ctx android.ModuleContext, outputSrcJar android.WritablePath,
protoFiles android.Paths, protoFlags string, protoOut, protoOutFlags string) {
protoFiles android.Paths, protoFlags []string, protoOut, protoOutFlags string) {
ctx.Build(pctx, android.BuildParams{
Rule: proto,
@ -50,7 +52,7 @@ func genProto(ctx android.ModuleContext, outputSrcJar android.WritablePath,
"outDir": android.ProtoDir(ctx).String(),
"protoOut": protoOut,
"protoOutFlags": protoOutFlags,
"protoFlags": protoFlags,
"protoFlags": strings.Join(protoFlags, " "),
},
})
}
@ -93,5 +95,8 @@ func protoFlags(ctx android.ModuleContext, p *android.ProtoProperties, flags jav
ctx.PropertyErrorf("proto.type", "unknown proto type %q",
proptools.String(p.Proto.Type))
}
flags.protoFlags = android.ProtoFlags(ctx, p)
return flags
}