use of com.synopsys.integration.detectable.detectables.bazel.pipeline.WorkspaceRuleChooser in project synopsys-detect by blackducksoftware.
the class DetectableFactory method bazelExtractor.
// #endregion
// #region Utility
private BazelExtractor bazelExtractor(BazelDetectableOptions bazelDetectableOptions) {
WorkspaceRuleChooser workspaceRuleChooser = new WorkspaceRuleChooser();
BazelWorkspaceFileParser bazelWorkspaceFileParser = new BazelWorkspaceFileParser();
HaskellCabalLibraryJsonProtoParser haskellCabalLibraryJsonProtoParser = new HaskellCabalLibraryJsonProtoParser(gson);
BazelVariableSubstitutor bazelVariableSubstitutor = new BazelVariableSubstitutor(bazelDetectableOptions.getTargetName().orElse(null), bazelDetectableOptions.getBazelCqueryAdditionalOptions());
BazelProjectNameGenerator bazelProjectNameGenerator = new BazelProjectNameGenerator();
return new BazelExtractor(executableRunner, externalIdFactory, bazelWorkspaceFileParser, workspaceRuleChooser, toolVersionLogger, haskellCabalLibraryJsonProtoParser, bazelDetectableOptions.getTargetName().orElse(null), bazelDetectableOptions.getWorkspaceRulesFromProperty(), bazelVariableSubstitutor, bazelProjectNameGenerator);
}
use of com.synopsys.integration.detectable.detectables.bazel.pipeline.WorkspaceRuleChooser in project synopsys-detect by blackducksoftware.
the class WorkspaceRuleChooserTest method run.
private Set<WorkspaceRule> run(Set<WorkspaceRule> workspaceRulesFromProperty, Set<WorkspaceRule> parsedWorkspaceRules) throws IntegrationException {
WorkspaceRuleChooser workspaceRuleChooser = new WorkspaceRuleChooser();
Set<WorkspaceRule> chosenWorkspaceRules = workspaceRuleChooser.choose(parsedWorkspaceRules, workspaceRulesFromProperty);
return chosenWorkspaceRules;
}
Aggregations