use of com.google.devtools.intellij.ideinfo.IntellijIdeInfo.PyIdeInfo in project bazel by bazelbuild.
the class AndroidStudioInfoAspect method makePyIdeInfo.
private static PyIdeInfo makePyIdeInfo(ConfiguredTarget base, RuleContext ruleContext, NestedSetBuilder<Artifact> ideResolveArtifacts) {
PyIdeInfo.Builder builder = PyIdeInfo.newBuilder();
Collection<Artifact> sourceFiles = getSources(ruleContext);
for (Artifact sourceFile : sourceFiles) {
builder.addSources(makeArtifactLocation(sourceFile));
}
// Ensure we add all generated sources to the ide-resolve output group.
// See {@link PyCommon#collectTransitivePythonSources}.
OutputGroupProvider outputGroupProvider = base.getProvider(OutputGroupProvider.class);
if (outputGroupProvider != null) {
ideResolveArtifacts.addTransitive(outputGroupProvider.getOutputGroup(OutputGroupProvider.FILES_TO_COMPILE));
}
return builder.build();
}
Aggregations