use of com.google.devtools.build.lib.analysis.ConfiguredAspect.Builder in project bazel by bazelbuild.
the class AndroidStudioInfoAspect method create.
@Override
public ConfiguredAspect create(ConfiguredTarget base, RuleContext ruleContext, AspectParameters parameters) {
ConfiguredAspect.Builder builder = new Builder(this, parameters, ruleContext);
AndroidStudioInfoFilesProvider.Builder providerBuilder = new AndroidStudioInfoFilesProvider.Builder();
DependenciesResult dependenciesResult = processDependencies(base, ruleContext, providerBuilder);
AndroidStudioInfoFilesProvider provider = createIdeBuildArtifact(base, ruleContext, dependenciesResult, providerBuilder);
NestedSetBuilder<Artifact> ideCompileArtifacts = NestedSetBuilder.stableOrder();
// Add artifacts required for compilation
OutputGroupProvider outputGroupProvider = base.getProvider(OutputGroupProvider.class);
if (outputGroupProvider != null) {
ideCompileArtifacts.addTransitive(outputGroupProvider.getOutputGroup(OutputGroupProvider.FILES_TO_COMPILE));
}
builder.addOutputGroup(IDE_INFO, provider.getIdeInfoFiles()).addOutputGroup(IDE_INFO_TEXT, provider.getIdeInfoTextFiles()).addOutputGroup(IDE_RESOLVE, provider.getIdeResolveFiles()).addOutputGroup(IDE_COMPILE, ideCompileArtifacts.build()).addProvider(provider);
return builder.build();
}
Aggregations