Loading java/proto.go +8 −0 Original line number Diff line number Diff line Loading @@ -75,9 +75,11 @@ func protoFlags(ctx android.ModuleContext, j *CompilerProperties, p *android.Pro flags.proto = android.GetProtoFlags(ctx, p) if String(p.Proto.Plugin) == "" { var typeToPlugin string switch String(p.Proto.Type) { case "micro": flags.proto.OutTypeFlag = "--javamicro_out" typeToPlugin = "javamicro" case "nano": flags.proto.OutTypeFlag = "--javanano_out" case "lite": Loading @@ -89,6 +91,12 @@ func protoFlags(ctx android.ModuleContext, j *CompilerProperties, p *android.Pro ctx.PropertyErrorf("proto.type", "unknown proto type %q", String(p.Proto.Type)) } if typeToPlugin != "" { hostTool := ctx.Config().HostToolPath(ctx, "protoc-gen-"+typeToPlugin) flags.proto.Deps = append(flags.proto.Deps, hostTool) flags.proto.Flags = append(flags.proto.Flags, "--plugin=protoc-gen-"+typeToPlugin+"="+hostTool.String()) } } flags.proto.OutParams = append(flags.proto.OutParams, j.Proto.Output_params...) Loading Loading
java/proto.go +8 −0 Original line number Diff line number Diff line Loading @@ -75,9 +75,11 @@ func protoFlags(ctx android.ModuleContext, j *CompilerProperties, p *android.Pro flags.proto = android.GetProtoFlags(ctx, p) if String(p.Proto.Plugin) == "" { var typeToPlugin string switch String(p.Proto.Type) { case "micro": flags.proto.OutTypeFlag = "--javamicro_out" typeToPlugin = "javamicro" case "nano": flags.proto.OutTypeFlag = "--javanano_out" case "lite": Loading @@ -89,6 +91,12 @@ func protoFlags(ctx android.ModuleContext, j *CompilerProperties, p *android.Pro ctx.PropertyErrorf("proto.type", "unknown proto type %q", String(p.Proto.Type)) } if typeToPlugin != "" { hostTool := ctx.Config().HostToolPath(ctx, "protoc-gen-"+typeToPlugin) flags.proto.Deps = append(flags.proto.Deps, hostTool) flags.proto.Flags = append(flags.proto.Flags, "--plugin=protoc-gen-"+typeToPlugin+"="+hostTool.String()) } } flags.proto.OutParams = append(flags.proto.OutParams, j.Proto.Output_params...) Loading