Include `java_toolchain.package_configuration` in proto javacopts
@@ -16,6 +16,7 @@ package com.google.devtools.build.lib.rules.java.proto;
import com.google.common.collect.ImmutableList;
import com.google.devtools.build.lib.analysis.RuleContext;
+import com.google.devtools.build.lib.rules.java.JavaCommon;
import com.google.devtools.build.lib.rules.java.JavaSemantics;
import com.google.devtools.build.lib.rules.java.JavaToolchainProvider;
@@ -32,6 +33,7 @@ public class ProtoJavacOpts {
return ImmutableList.<String>builder()
.addAll(toolchain.getJavacOptions(ruleContext))
.addAll(toolchain.getCompatibleJavacOptions(JavaSemantics.PROTO_JAVACOPTS_KEY))
+ .addAll(JavaCommon.computePerPackageJavacOpts(ruleContext, toolchain))
.build();
}
