Add call to checkDesugarDeps in AndroidBinary.
@@ -341,7 +341,7 @@ public abstract class AndroidBinary implements RuleConfiguredTargetFactory {
Function<Artifact, Artifact> derivedJarFunction =
collectDesugaredJars(ruleContext, androidCommon, androidSemantics, resourceClasses);
Artifact deployJar = createDeployJar(ruleContext, javaSemantics, androidCommon, resourceClasses,
- derivedJarFunction);
+ AndroidCommon.getAndroidConfig(ruleContext).checkDesugarDeps(), derivedJarFunction);
OneVersionEnforcementLevel oneVersionEnforcementLevel =
ruleContext.getFragment(JavaConfiguration.class).oneVersionEnforcementLevel();
@@ -760,6 +760,7 @@ public abstract class AndroidBinary implements RuleConfiguredTargetFactory {
JavaSemantics javaSemantics,
AndroidCommon common,
JavaTargetAttributes attributes,
+ boolean checkDesugarDeps,
Function<Artifact, Artifact> derivedJarFunction)
throws InterruptedException {
Artifact deployJar =
@@ -769,7 +770,7 @@ public abstract class AndroidBinary implements RuleConfiguredTargetFactory {
.setAttributes(attributes)
.addRuntimeJars(common.getRuntimeJars())
.setDerivedJarFunction(derivedJarFunction)
- .setCheckDesugarDeps(AndroidCommon.getAndroidConfig(ruleContext).checkDesugarDeps())
+ .setCheckDesugarDeps(checkDesugarDeps)
.build();
return deployJar;
}
