use of org.gradle.language.base.internal.compile.VersionAwareCompiler in project gradle by gradle.
the class AbstractNativeSourceCompileTask method getCompilerVersion.
/**
* The compiler used, including the type and the version.
*
* @since 4.4
*/
@Nullable
@Optional
@Nested
protected CompilerVersion getCompilerVersion() {
NativeToolChainInternal toolChain = (NativeToolChainInternal) getToolChain().get();
NativePlatformInternal targetPlatform = (NativePlatformInternal) getTargetPlatform().get();
PlatformToolProvider toolProvider = toolChain.select(targetPlatform);
Compiler<? extends NativeCompileSpec> compiler = toolProvider.newCompiler(createCompileSpec().getClass());
if (!(compiler instanceof VersionAwareCompiler)) {
return null;
}
return ((VersionAwareCompiler) compiler).getVersion();
}
use of org.gradle.language.base.internal.compile.VersionAwareCompiler in project gradle by gradle.
the class SwiftPlatformToolProvider method createLinker.
@Override
protected Compiler<LinkerSpec> createLinker() {
CommandLineToolConfigurationInternal linkerTool = (CommandLineToolConfigurationInternal) toolRegistry.getLinker();
SwiftLinker swiftLinker = new SwiftLinker(buildOperationExecutor, commandLineTool(ToolType.LINKER, "swiftc"), context(linkerTool), workerLeaseService);
return new VersionAwareCompiler<LinkerSpec>(swiftLinker, new DefaultCompilerVersion("swiftc", swiftcMetaData.getVendor(), swiftcMetaData.getVersion()));
}
use of org.gradle.language.base.internal.compile.VersionAwareCompiler in project gradle by gradle.
the class SwiftPlatformToolProvider method createSwiftCompiler.
protected Compiler<SwiftCompileSpec> createSwiftCompiler() {
CommandLineToolConfigurationInternal swiftCompilerTool = (CommandLineToolConfigurationInternal) toolRegistry.getSwiftCompiler();
SwiftCompiler swiftCompiler = new SwiftCompiler(buildOperationExecutor, compilerOutputFileNamingSchemeFactory, commandLineTool(ToolType.SWIFT_COMPILER, "swiftc"), context(swiftCompilerTool), getObjectFileExtension(), workerLeaseService, swiftcMetaData.getVersion());
return new VersionAwareCompiler<SwiftCompileSpec>(swiftCompiler, new DefaultCompilerVersion("swiftc", swiftcMetaData.getVendor(), swiftcMetaData.getVersion()));
}
Aggregations