use of org.gradle.nativeplatform.toolchain.internal.UnavailablePlatformToolProvider in project gradle by gradle.
the class AbstractGccCompatibleToolChain method createPlatformToolProvider.
private PlatformToolProvider createPlatformToolProvider(NativePlatformInternal targetPlatform) {
TargetPlatformConfiguration targetPlatformConfigurationConfiguration = getPlatformConfiguration(targetPlatform);
ToolChainAvailability result = new ToolChainAvailability();
if (targetPlatformConfigurationConfiguration == null) {
result.unavailable(String.format("Don't know how to build for platform '%s'.", targetPlatform.getName()));
return new UnavailablePlatformToolProvider(targetPlatform.getOperatingSystem(), result);
}
DefaultGccPlatformToolChain configurableToolChain = instantiator.newInstance(DefaultGccPlatformToolChain.class, targetPlatform);
addDefaultTools(configurableToolChain);
configureDefaultTools(configurableToolChain);
targetPlatformConfigurationConfiguration.apply(configurableToolChain);
configureActions.execute(configurableToolChain);
initTools(configurableToolChain, result);
if (!result.isAvailable()) {
return new UnavailablePlatformToolProvider(targetPlatform.getOperatingSystem(), result);
}
return new GccPlatformToolProvider(buildOperationProcessor, targetPlatform.getOperatingSystem(), toolSearchPath, configurableToolChain, execActionFactory, compilerOutputFileNamingSchemeFactory, configurableToolChain.isCanUseCommandFile());
}
use of org.gradle.nativeplatform.toolchain.internal.UnavailablePlatformToolProvider in project gradle by gradle.
the class VisualCppToolChain method select.
@Override
public PlatformToolProvider select(NativePlatformInternal targetPlatform) {
ToolChainAvailability result = new ToolChainAvailability();
result.mustBeAvailable(getAvailability());
if (visualCpp != null && !visualCpp.isSupportedPlatform(targetPlatform)) {
result.unavailable(String.format("Don't know how to build for platform '%s'.", targetPlatform.getName()));
}
if (!result.isAvailable()) {
return new UnavailablePlatformToolProvider(targetPlatform.getOperatingSystem(), result);
}
DefaultVisualCppPlatformToolChain configurableToolChain = instantiator.newInstance(DefaultVisualCppPlatformToolChain.class, targetPlatform, instantiator);
configureActions.execute(configurableToolChain);
return new VisualCppPlatformToolProvider(buildOperationProcessor, targetPlatform.getOperatingSystem(), configurableToolChain.tools, visualCpp, windowsSdk, ucrt, targetPlatform, execActionFactory, compilerOutputFileNamingSchemeFactory);
}
Aggregations