Add JavaSkylarkApiProvider to aar_import rule.
Without this, aar_import targets will not have java attribute in skylark, therefore not able to generate any ide info by intellij_info_aspect in intellij_info.bzl.
RELNOTES: None.
@@ -36,6 +36,7 @@ import com.google.devtools.build.lib.rules.java.JavaRuleOutputJarsProvider;
import com.google.devtools.build.lib.rules.java.JavaRuleOutputJarsProvider.OutputJar;
import com.google.devtools.build.lib.rules.java.JavaRuntimeJarProvider;
import com.google.devtools.build.lib.rules.java.JavaSemantics;
+import com.google.devtools.build.lib.rules.java.JavaSkylarkApiProvider;
import com.google.devtools.build.lib.rules.java.JavaToolchainProvider;
import com.google.devtools.build.lib.rules.java.Jvm;
import com.google.devtools.build.lib.vfs.PathFragment;
@@ -151,6 +152,8 @@ public class AarImport implements RuleConfiguredTargetFactory {
return ruleBuilder
.setFilesToBuild(filesToBuildBuilder.build())
+ .addSkylarkTransitiveInfo(
+ JavaSkylarkApiProvider.NAME, JavaSkylarkApiProvider.fromRuleContext())
.addProvider(RunfilesProvider.class, RunfilesProvider.EMPTY)
.addProvider(
AndroidResourcesProvider.class, resourceApk.toResourceProvider(ruleContext.getLabel()))
