Refactor AarImport by extracting javaCompilationArgsProvider. This provider will be used for the dependency checker later. Refactoring it now just avoids future potential merge conflicts.
RELNOTES: None
@@ -133,10 +133,7 @@ public class AarImport implements RuleConfiguredTargetFactory {
.addCompileTimeJarAsFullJar(mergedJar)
.build());
- JavaInfo.Builder javaInfoBuilder =
- JavaInfo.Builder.create()
- .addProvider(
- JavaCompilationArgsProvider.class,
+ JavaCompilationArgsProvider javaCompilationArgsProvider =
JavaCompilationArgsProvider.create(
common.collectJavaCompilationArgs(
/* recursive = */ false,
@@ -145,7 +142,11 @@ public class AarImport implements RuleConfiguredTargetFactory {
common.collectJavaCompilationArgs(
/* recursive = */ true,
JavaCommon.isNeverLink(ruleContext),
- /* srcLessDepsExport = */ false)))
+ /* srcLessDepsExport = */ false));
+
+ JavaInfo.Builder javaInfoBuilder =
+ JavaInfo.Builder.create()
+ .addProvider(JavaCompilationArgsProvider.class, javaCompilationArgsProvider)
.addProvider(JavaRuleOutputJarsProvider.class, jarProviderBuilder.build());
common.addTransitiveInfoProviders(
