Add flavour name for java proto compilation.
MOS_MIGRATED_REVID=149274808
@@ -57,6 +57,13 @@ public class JavaProtoSkylarkCommon {
positional = false,
named = true,
type = String.class
+ ),
+ @Param(
+ name = "flavour",
+ positional = false,
+ named = true,
+ type = String.class,
+ defaultValue = "java"
)
}
)
@@ -64,14 +71,15 @@ public class JavaProtoSkylarkCommon {
SkylarkRuleContext skylarkRuleContext,
ConfiguredTarget target,
Artifact sourceJar,
- String protoToolchainAttr) {
+ String protoToolchainAttr,
+ String flavour) {
SupportData supportData =
checkNotNull(target.getProvider(ProtoSupportDataProvider.class).getSupportData());
ProtoCompileActionBuilder.registerActions(
skylarkRuleContext.getRuleContext(),
ImmutableList.of(
new ProtoCompileActionBuilder.ToolchainInvocation(
- "javalite",
+ flavour,
getProtoToolchainProvider(skylarkRuleContext, protoToolchainAttr),
sourceJar.getExecPathString())),
supportData.getDirectProtoSources(),
