use of org.gradle.platform.base.internal.toolchain.ComponentNotFound in project gradle by gradle.
the class GccPlatformToolProvider method getGccMetadata.
private SearchResult<GccMetadata> getGccMetadata(ToolType compilerType) {
GccCommandLineToolConfigurationInternal compiler = toolRegistry.getTool(compilerType);
if (compiler == null) {
return new ComponentNotFound<GccMetadata>("Tool " + compilerType.getToolName() + " is not available");
}
CommandLineToolSearchResult searchResult = toolSearchPath.locate(compiler.getToolType(), compiler.getExecutable());
String language = LANGUAGE_FOR_COMPILER.get(compilerType);
List<String> languageArgs = language == null ? Collections.<String>emptyList() : ImmutableList.of("-x", language);
return metadataProvider.getCompilerMetaData(toolSearchPath.getPath(), spec -> spec.executable(searchResult.getTool()).args(languageArgs));
}
use of org.gradle.platform.base.internal.toolchain.ComponentNotFound in project gradle by gradle.
the class AbstractWindowsKitComponentLocator method locateUserSpecifiedComponent.
private SearchResult<T> locateUserSpecifiedComponent(File candidate) {
File windowsKitDir = FileUtils.canonicalize(candidate);
Set<T> candidates = foundComponents.get(windowsKitDir);
if (candidates.isEmpty()) {
candidates = findIn(windowsKitDir, DiscoveryType.USER);
}
if (candidates.isEmpty()) {
return new ComponentNotFound<T>(String.format("The specified installation directory '%s' does not appear to contain a %s installation.", candidate, getDisplayName()));
}
Set<T> found = new TreeSet<T>(new DescendingComponentVersionComparator());
found.addAll(candidates);
return new ComponentFound<T>(found.iterator().next());
}
Aggregations