Search in sources :

Example 1 with DefaultSwiftPlatform

use of org.gradle.language.swift.internal.DefaultSwiftPlatform in project gradle by gradle.

the class DefaultToolChainSelector method select.

@Override
public <T extends NativePlatform> Result<T> select(Class<T> platformType) {
    DefaultNativePlatform targetMachine = host;
    // TODO - push all this stuff down to the tool chain and let it create the specific platform and provider
    NativeLanguage sourceLanguage = platformType == SwiftPlatform.class ? NativeLanguage.SWIFT : NativeLanguage.CPP;
    NativeToolChainRegistryInternal registry = modelRegistry.realize("toolChains", NativeToolChainRegistryInternal.class);
    NativeToolChainInternal toolChain = registry.getForPlatform(sourceLanguage, targetMachine);
    // TODO - don't select again here, as the selection is already performed to select the toolchain
    PlatformToolProvider toolProvider = toolChain.select(sourceLanguage, targetMachine);
    if (!toolProvider.isAvailable() && targetMachine.getOperatingSystem().isWindows() && targetMachine.getArchitecture().isAmd64()) {
        // Try building x86 on Windows. Don't do this for other operating systems (yet)
        DefaultNativePlatform x86platformRequest = targetMachine.withArchitecture(Architectures.of(Architectures.X86));
        NativeToolChainInternal x86ToolChain = registry.getForPlatform(sourceLanguage, x86platformRequest);
        // TODO - don't select again here, as the selection is already performed to select the toolchain
        PlatformToolProvider x86ToolProvider = x86ToolChain.select(sourceLanguage, x86platformRequest);
        if (x86ToolProvider.isAvailable()) {
            targetMachine = x86platformRequest;
            toolChain = x86ToolChain;
            toolProvider = x86ToolProvider;
        }
    }
    // TODO - use a better name for the platforms, rather than "current"
    T targetPlatform = null;
    if (CppPlatform.class.isAssignableFrom(platformType)) {
        targetPlatform = platformType.cast(new DefaultCppPlatform("host", targetMachine));
    } else if (SwiftPlatform.class.isAssignableFrom(platformType)) {
        targetPlatform = platformType.cast(new DefaultSwiftPlatform("host", targetMachine));
    }
    return new DefaultResult<T>(toolChain, toolProvider, targetPlatform);
}
Also used : NativeToolChainInternal(org.gradle.nativeplatform.toolchain.internal.NativeToolChainInternal) NativeLanguage(org.gradle.nativeplatform.toolchain.internal.NativeLanguage) DefaultSwiftPlatform(org.gradle.language.swift.internal.DefaultSwiftPlatform) NativeToolChainRegistryInternal(org.gradle.nativeplatform.toolchain.internal.NativeToolChainRegistryInternal) PlatformToolProvider(org.gradle.nativeplatform.toolchain.internal.PlatformToolProvider) DefaultNativePlatform(org.gradle.nativeplatform.platform.internal.DefaultNativePlatform) DefaultCppPlatform(org.gradle.language.cpp.internal.DefaultCppPlatform) SwiftPlatform(org.gradle.language.swift.SwiftPlatform) DefaultSwiftPlatform(org.gradle.language.swift.internal.DefaultSwiftPlatform)

Example 2 with DefaultSwiftPlatform

use of org.gradle.language.swift.internal.DefaultSwiftPlatform in project gradle by gradle.

the class DefaultToolChainSelector method select.

public Result<SwiftPlatform> select(SwiftPlatform requestPlatform) {
    DefaultNativePlatform targetNativePlatform = newNativePlatform(requestPlatform.getTargetMachine());
    // TODO - push all this stuff down to the tool chain and let it create the specific platform and provider
    NativeLanguage sourceLanguage = NativeLanguage.SWIFT;
    NativeToolChainInternal toolChain = getToolChain(sourceLanguage, targetNativePlatform);
    // TODO - don't select again here, as the selection is already performed to select the toolchain
    PlatformToolProvider toolProvider = toolChain.select(sourceLanguage, targetNativePlatform);
    SwiftVersion sourceCompatibility = requestPlatform.getSourceCompatibility();
    if (sourceCompatibility == null && toolProvider.isAvailable()) {
        sourceCompatibility = toSwiftVersion(toolProvider.getCompilerMetadata(ToolType.SWIFT_COMPILER).getVersion());
    }
    SwiftPlatform targetPlatform = new DefaultSwiftPlatform(requestPlatform.getTargetMachine(), sourceCompatibility, targetNativePlatform);
    return new DefaultResult<SwiftPlatform>(toolChain, toolProvider, targetPlatform);
}
Also used : NativeToolChainInternal(org.gradle.nativeplatform.toolchain.internal.NativeToolChainInternal) NativeLanguage(org.gradle.nativeplatform.toolchain.internal.NativeLanguage) DefaultSwiftPlatform(org.gradle.language.swift.internal.DefaultSwiftPlatform) SwiftVersion(org.gradle.language.swift.SwiftVersion) PlatformToolProvider(org.gradle.nativeplatform.toolchain.internal.PlatformToolProvider) DefaultNativePlatform(org.gradle.nativeplatform.platform.internal.DefaultNativePlatform) SwiftPlatform(org.gradle.language.swift.SwiftPlatform) DefaultSwiftPlatform(org.gradle.language.swift.internal.DefaultSwiftPlatform)

Example 3 with DefaultSwiftPlatform

use of org.gradle.language.swift.internal.DefaultSwiftPlatform in project gradle by gradle.

the class SwiftApplicationPlugin method apply.

@Override
public void apply(final Project project) {
    project.getPluginManager().apply(SwiftBasePlugin.class);
    final ObjectFactory objectFactory = project.getObjects();
    final ProviderFactory providers = project.getProviders();
    // Add the application and extension
    final DefaultSwiftApplication application = componentFactory.newInstance(SwiftApplication.class, DefaultSwiftApplication.class, "main");
    project.getExtensions().add(SwiftApplication.class, "application", application);
    project.getComponents().add(application);
    // Setup component
    application.getModule().convention(GUtil.toCamelCase(project.getName()));
    application.getTargetMachines().convention(Dimensions.useHostAsDefaultTargetMachine(targetMachineFactory));
    application.getDevelopmentBinary().convention(project.provider(() -> {
        return application.getBinaries().get().stream().filter(SwiftExecutable.class::isInstance).map(SwiftExecutable.class::cast).filter(binary -> !binary.isOptimized() && Architectures.forInput(binary.getTargetMachine().getArchitecture().getName()).equals(DefaultNativePlatform.host().getArchitecture())).findFirst().orElse(application.getBinaries().get().stream().filter(SwiftExecutable.class::isInstance).map(SwiftExecutable.class::cast).filter(binary -> !binary.isOptimized()).findFirst().orElse(null));
    }));
    project.afterEvaluate(p -> {
        // TODO: make build type configurable for components
        Dimensions.applicationVariants(application.getModule(), application.getTargetMachines(), objectFactory, attributesFactory, providers.provider(() -> project.getGroup().toString()), providers.provider(() -> project.getVersion().toString()), variantIdentity -> {
            if (tryToBuildOnHost(variantIdentity)) {
                application.getSourceCompatibility().finalizeValue();
                ToolChainSelector.Result<SwiftPlatform> result = toolChainSelector.select(SwiftPlatform.class, new DefaultSwiftPlatform(variantIdentity.getTargetMachine(), application.getSourceCompatibility().getOrNull()));
                application.addExecutable(variantIdentity, variantIdentity.isDebuggable() && !variantIdentity.isOptimized(), result.getTargetPlatform(), result.getToolChain(), result.getPlatformToolProvider());
            }
        });
        // Configure the binaries
        application.getBinaries().realizeNow();
    });
}
Also used : ImmutableAttributesFactory(org.gradle.api.internal.attributes.ImmutableAttributesFactory) NativeComponentFactory(org.gradle.language.internal.NativeComponentFactory) SwiftApplication(org.gradle.language.swift.SwiftApplication) SwiftPlatform(org.gradle.language.swift.SwiftPlatform) Project(org.gradle.api.Project) Dimensions(org.gradle.language.nativeplatform.internal.Dimensions) ToolChainSelector(org.gradle.language.nativeplatform.internal.toolchains.ToolChainSelector) Dimensions.tryToBuildOnHost(org.gradle.language.nativeplatform.internal.Dimensions.tryToBuildOnHost) GUtil(org.gradle.util.internal.GUtil) Inject(javax.inject.Inject) ProviderFactory(org.gradle.api.provider.ProviderFactory) SwiftExecutable(org.gradle.language.swift.SwiftExecutable) DefaultNativePlatform(org.gradle.nativeplatform.platform.internal.DefaultNativePlatform) ObjectFactory(org.gradle.api.model.ObjectFactory) Architectures(org.gradle.nativeplatform.platform.internal.Architectures) TargetMachineFactory(org.gradle.nativeplatform.TargetMachineFactory) DefaultSwiftPlatform(org.gradle.language.swift.internal.DefaultSwiftPlatform) DefaultSwiftApplication(org.gradle.language.swift.internal.DefaultSwiftApplication) Plugin(org.gradle.api.Plugin) DefaultSwiftPlatform(org.gradle.language.swift.internal.DefaultSwiftPlatform) ObjectFactory(org.gradle.api.model.ObjectFactory) SwiftExecutable(org.gradle.language.swift.SwiftExecutable) DefaultSwiftApplication(org.gradle.language.swift.internal.DefaultSwiftApplication) ProviderFactory(org.gradle.api.provider.ProviderFactory) ToolChainSelector(org.gradle.language.nativeplatform.internal.toolchains.ToolChainSelector) SwiftPlatform(org.gradle.language.swift.SwiftPlatform) DefaultSwiftPlatform(org.gradle.language.swift.internal.DefaultSwiftPlatform)

Example 4 with DefaultSwiftPlatform

use of org.gradle.language.swift.internal.DefaultSwiftPlatform in project gradle by gradle.

the class SwiftLibraryPlugin method apply.

@Override
public void apply(final Project project) {
    project.getPluginManager().apply(SwiftBasePlugin.class);
    final ConfigurationContainer configurations = project.getConfigurations();
    final ObjectFactory objectFactory = project.getObjects();
    final ProviderFactory providers = project.getProviders();
    final DefaultSwiftLibrary library = componentFactory.newInstance(SwiftLibrary.class, DefaultSwiftLibrary.class, "main");
    project.getExtensions().add(SwiftLibrary.class, "library", library);
    project.getComponents().add(library);
    // Setup component
    final Property<String> module = library.getModule();
    module.set(GUtil.toCamelCase(project.getName()));
    library.getTargetMachines().convention(useHostAsDefaultTargetMachine(targetMachineFactory));
    library.getDevelopmentBinary().convention(project.provider(new Callable<SwiftBinary>() {

        @Override
        public SwiftBinary call() throws Exception {
            return getDebugSharedHostStream().findFirst().orElse(getDebugStaticHostStream().findFirst().orElse(getDebugSharedStream().findFirst().orElse(getDebugStaticStream().findFirst().orElse(null))));
        }

        private Stream<SwiftBinary> getDebugStream() {
            return library.getBinaries().get().stream().filter(binary -> !binary.isOptimized());
        }

        private Stream<SwiftBinary> getDebugSharedStream() {
            return getDebugStream().filter(SwiftSharedLibrary.class::isInstance);
        }

        private Stream<SwiftBinary> getDebugSharedHostStream() {
            return getDebugSharedStream().filter(binary -> Architectures.forInput(binary.getTargetMachine().getArchitecture().getName()).equals(DefaultNativePlatform.host().getArchitecture()));
        }

        private Stream<SwiftBinary> getDebugStaticStream() {
            return getDebugStream().filter(SwiftStaticLibrary.class::isInstance);
        }

        private Stream<SwiftBinary> getDebugStaticHostStream() {
            return getDebugStaticStream().filter(binary -> Architectures.forInput(binary.getTargetMachine().getArchitecture().getName()).equals(DefaultNativePlatform.host().getArchitecture()));
        }
    }));
    project.afterEvaluate(p -> {
        // TODO: make build type configurable for components
        Dimensions.libraryVariants(library.getModule(), library.getLinkage(), library.getTargetMachines(), objectFactory, attributesFactory, providers.provider(() -> project.getGroup().toString()), providers.provider(() -> project.getVersion().toString()), variantIdentity -> {
            if (tryToBuildOnHost(variantIdentity)) {
                library.getSourceCompatibility().finalizeValue();
                ToolChainSelector.Result<SwiftPlatform> result = toolChainSelector.select(SwiftPlatform.class, new DefaultSwiftPlatform(variantIdentity.getTargetMachine(), library.getSourceCompatibility().getOrNull()));
                if (variantIdentity.getLinkage().equals(Linkage.SHARED)) {
                    library.addSharedLibrary(variantIdentity, variantIdentity.isDebuggable() && !variantIdentity.isOptimized(), result.getTargetPlatform(), result.getToolChain(), result.getPlatformToolProvider());
                } else {
                    library.addStaticLibrary(variantIdentity, variantIdentity.isDebuggable() && !variantIdentity.isOptimized(), result.getTargetPlatform(), result.getToolChain(), result.getPlatformToolProvider());
                }
            }
        });
        library.getBinaries().whenElementKnown(SwiftSharedLibrary.class, sharedLibrary -> {
            Names names = ((ComponentWithNames) sharedLibrary).getNames();
            Configuration apiElements = configurations.create(names.withSuffix("SwiftApiElements"));
            // TODO This should actually extend from the api dependencies, but since Swift currently
            // requires all dependencies to be treated like api dependencies (with transitivity) we just
            // use the implementation dependencies here.  See https://bugs.swift.org/browse/SR-1393.
            apiElements.extendsFrom(((DefaultSwiftSharedLibrary) sharedLibrary).getImplementationDependencies());
            apiElements.setCanBeResolved(false);
            apiElements.getAttributes().attribute(Usage.USAGE_ATTRIBUTE, objectFactory.named(Usage.class, Usage.SWIFT_API));
            apiElements.getAttributes().attribute(LINKAGE_ATTRIBUTE, Linkage.SHARED);
            apiElements.getAttributes().attribute(DEBUGGABLE_ATTRIBUTE, sharedLibrary.isDebuggable());
            apiElements.getAttributes().attribute(OPTIMIZED_ATTRIBUTE, sharedLibrary.isOptimized());
            apiElements.getAttributes().attribute(OperatingSystemFamily.OPERATING_SYSTEM_ATTRIBUTE, sharedLibrary.getTargetMachine().getOperatingSystemFamily());
            apiElements.getOutgoing().artifact(sharedLibrary.getModuleFile());
        });
        library.getBinaries().whenElementKnown(SwiftStaticLibrary.class, staticLibrary -> {
            Names names = ((ComponentWithNames) staticLibrary).getNames();
            Configuration apiElements = configurations.create(names.withSuffix("SwiftApiElements"));
            // TODO This should actually extend from the api dependencies, but since Swift currently
            // requires all dependencies to be treated like api dependencies (with transitivity) we just
            // use the implementation dependencies here.  See https://bugs.swift.org/browse/SR-1393.
            apiElements.extendsFrom(((DefaultSwiftStaticLibrary) staticLibrary).getImplementationDependencies());
            apiElements.setCanBeResolved(false);
            apiElements.getAttributes().attribute(Usage.USAGE_ATTRIBUTE, objectFactory.named(Usage.class, Usage.SWIFT_API));
            apiElements.getAttributes().attribute(LINKAGE_ATTRIBUTE, Linkage.STATIC);
            apiElements.getAttributes().attribute(DEBUGGABLE_ATTRIBUTE, staticLibrary.isDebuggable());
            apiElements.getAttributes().attribute(OPTIMIZED_ATTRIBUTE, staticLibrary.isOptimized());
            apiElements.getAttributes().attribute(OperatingSystemFamily.OPERATING_SYSTEM_ATTRIBUTE, staticLibrary.getTargetMachine().getOperatingSystemFamily());
            apiElements.getOutgoing().artifact(staticLibrary.getModuleFile());
        });
        library.getBinaries().realizeNow();
    });
}
Also used : Usage(org.gradle.api.attributes.Usage) DefaultSwiftPlatform(org.gradle.language.swift.internal.DefaultSwiftPlatform) Configuration(org.gradle.api.artifacts.Configuration) DefaultSwiftLibrary(org.gradle.language.swift.internal.DefaultSwiftLibrary) SwiftStaticLibrary(org.gradle.language.swift.SwiftStaticLibrary) DefaultSwiftStaticLibrary(org.gradle.language.swift.internal.DefaultSwiftStaticLibrary) ComponentWithNames(org.gradle.language.nativeplatform.internal.ComponentWithNames) Callable(java.util.concurrent.Callable) ComponentWithNames(org.gradle.language.nativeplatform.internal.ComponentWithNames) Names(org.gradle.language.nativeplatform.internal.Names) ObjectFactory(org.gradle.api.model.ObjectFactory) SwiftBinary(org.gradle.language.swift.SwiftBinary) ConfigurationContainer(org.gradle.api.artifacts.ConfigurationContainer) ProviderFactory(org.gradle.api.provider.ProviderFactory) SwiftSharedLibrary(org.gradle.language.swift.SwiftSharedLibrary) DefaultSwiftSharedLibrary(org.gradle.language.swift.internal.DefaultSwiftSharedLibrary) ToolChainSelector(org.gradle.language.nativeplatform.internal.toolchains.ToolChainSelector) SwiftPlatform(org.gradle.language.swift.SwiftPlatform) DefaultSwiftPlatform(org.gradle.language.swift.internal.DefaultSwiftPlatform)

Example 5 with DefaultSwiftPlatform

use of org.gradle.language.swift.internal.DefaultSwiftPlatform in project gradle by gradle.

the class XCTestConventionPlugin method apply.

@Override
public void apply(Project project) {
    project.getPluginManager().apply(SwiftBasePlugin.class);
    project.getPluginManager().apply(NativeTestingBasePlugin.class);
    final ProviderFactory providers = project.getProviders();
    // Create test suite component
    // TODO - Reuse logic from Swift*Plugin
    // TODO - component name and extension name aren't the same
    // TODO - should use `src/xctest/swift` as the convention?
    // Add the test suite and extension
    DefaultSwiftXCTestSuite testSuite = componentFactory.newInstance(SwiftXCTestSuite.class, DefaultSwiftXCTestSuite.class, "test");
    project.getExtensions().add(SwiftXCTestSuite.class, "xctest", testSuite);
    project.getComponents().add(testSuite);
    // Setup component
    testSuite.getModule().set(GUtil.toCamelCase(project.getName() + "Test"));
    final DefaultSwiftXCTestSuite testComponent = testSuite;
    testComponent.getTargetMachines().convention(useHostAsDefaultTargetMachine(targetMachineFactory));
    testComponent.getSourceCompatibility().convention(testComponent.getTestedComponent().flatMap(it -> it.getSourceCompatibility()));
    final String mainComponentName = "main";
    project.getComponents().withType(ProductionSwiftComponent.class, component -> {
        if (mainComponentName.equals(component.getName())) {
            testComponent.getTargetMachines().convention(component.getTargetMachines());
            testComponent.getTestedComponent().convention(component);
        }
    });
    testComponent.getTestBinary().convention(project.provider(() -> {
        return testComponent.getBinaries().get().stream().filter(SwiftXCTestBinary.class::isInstance).map(SwiftXCTestBinary.class::cast).findFirst().orElse(null);
    }));
    testComponent.getBinaries().whenElementKnown(DefaultSwiftXCTestBinary.class, binary -> {
        // Create test suite test task
        TaskProvider<XCTest> testingTask = project.getTasks().register("xcTest", XCTest.class, task -> {
            task.setGroup(LifecycleBasePlugin.VERIFICATION_GROUP);
            task.setDescription("Executes XCTest suites");
            task.getTestInstallDirectory().set(binary.getInstallDirectory());
            task.getRunScriptFile().set(binary.getRunScriptFile());
            task.getWorkingDirectory().set(binary.getInstallDirectory());
        });
        binary.getRunTask().set(testingTask);
        configureTestSuiteBuildingTasks(project, binary);
        configureTestSuiteWithTestedComponentWhenAvailable(project, testComponent, binary);
    });
    project.afterEvaluate(p -> {
        final SwiftComponent mainComponent = testComponent.getTestedComponent().getOrNull();
        final SetProperty<TargetMachine> mainTargetMachines = mainComponent != null ? mainComponent.getTargetMachines() : null;
        Dimensions.unitTestVariants(testComponent.getModule(), testComponent.getTargetMachines(), mainTargetMachines, objectFactory, attributesFactory, providers.provider(() -> project.getGroup().toString()), providers.provider(() -> project.getVersion().toString()), variantIdentity -> {
            if (tryToBuildOnHost(variantIdentity)) {
                testComponent.getSourceCompatibility().finalizeValue();
                ToolChainSelector.Result<SwiftPlatform> result = toolChainSelector.select(SwiftPlatform.class, new DefaultSwiftPlatform(variantIdentity.getTargetMachine(), testComponent.getSourceCompatibility().getOrNull()));
                // Create test suite executable
                if (result.getTargetPlatform().getTargetMachine().getOperatingSystemFamily().isMacOs()) {
                    testComponent.addBundle(variantIdentity, result.getTargetPlatform(), result.getToolChain(), result.getPlatformToolProvider());
                } else {
                    testComponent.addExecutable(variantIdentity, result.getTargetPlatform(), result.getToolChain(), result.getPlatformToolProvider());
                }
            }
        });
        testComponent.getBinaries().realizeNow();
    });
}
Also used : ConfigurableFileCollection(org.gradle.api.file.ConfigurableFileCollection) Arrays(java.util.Arrays) UnexportMainSymbol(org.gradle.language.nativeplatform.tasks.UnexportMainSymbol) NativeToolChainRegistryInternal(org.gradle.nativeplatform.toolchain.internal.NativeToolChainRegistryInternal) ProductionSwiftComponent(org.gradle.language.swift.ProductionSwiftComponent) DefaultSwiftXCTestExecutable(org.gradle.nativeplatform.test.xctest.internal.DefaultSwiftXCTestExecutable) GUtil(org.gradle.util.internal.GUtil) Provider(org.gradle.api.provider.Provider) ModelRegistry(org.gradle.model.internal.registry.ModelRegistry) DefaultNativePlatform(org.gradle.nativeplatform.platform.internal.DefaultNativePlatform) DefaultSwiftXCTestSuite(org.gradle.nativeplatform.test.xctest.internal.DefaultSwiftXCTestSuite) TaskProvider(org.gradle.api.tasks.TaskProvider) XCTest(org.gradle.nativeplatform.test.xctest.tasks.XCTest) TargetMachineFactory(org.gradle.nativeplatform.TargetMachineFactory) SwiftXCTestBundle(org.gradle.nativeplatform.test.xctest.SwiftXCTestBundle) ProjectInternal(org.gradle.api.internal.project.ProjectInternal) SwiftBasePlugin(org.gradle.language.swift.plugins.SwiftBasePlugin) PlatformToolProvider(org.gradle.nativeplatform.toolchain.internal.PlatformToolProvider) ImmutableAttributesFactory(org.gradle.api.internal.attributes.ImmutableAttributesFactory) Project(org.gradle.api.Project) TargetMachine(org.gradle.nativeplatform.TargetMachine) Dimensions(org.gradle.language.nativeplatform.internal.Dimensions) ToolChainSelector(org.gradle.language.nativeplatform.internal.toolchains.ToolChainSelector) MacOSSdkPlatformPathLocator(org.gradle.nativeplatform.toolchain.internal.xcode.MacOSSdkPlatformPathLocator) TaskContainer(org.gradle.api.tasks.TaskContainer) Names(org.gradle.language.nativeplatform.internal.Names) NativeToolChain(org.gradle.nativeplatform.toolchain.NativeToolChain) SwiftPlatform(org.gradle.language.swift.SwiftPlatform) SwiftXCTestBinary(org.gradle.nativeplatform.test.xctest.SwiftXCTestBinary) DefaultSwiftXCTestBinary(org.gradle.nativeplatform.test.xctest.internal.DefaultSwiftXCTestBinary) NativeTestingBasePlugin(org.gradle.nativeplatform.test.plugins.NativeTestingBasePlugin) Dimensions.useHostAsDefaultTargetMachine(org.gradle.language.nativeplatform.internal.Dimensions.useHostAsDefaultTargetMachine) Dimensions.tryToBuildOnHost(org.gradle.language.nativeplatform.internal.Dimensions.tryToBuildOnHost) Inject(javax.inject.Inject) LifecycleBasePlugin(org.gradle.language.base.plugins.LifecycleBasePlugin) Lists(com.google.common.collect.Lists) Sync(org.gradle.api.tasks.Sync) LinkMachOBundle(org.gradle.nativeplatform.tasks.LinkMachOBundle) DefaultSwiftPlatform(org.gradle.language.swift.internal.DefaultSwiftPlatform) NativeComponentFactory(org.gradle.language.internal.NativeComponentFactory) SwiftApplication(org.gradle.language.swift.SwiftApplication) SwiftComponent(org.gradle.language.swift.SwiftComponent) NativeToolChainInternal(org.gradle.nativeplatform.toolchain.internal.NativeToolChainInternal) SwiftCompile(org.gradle.language.swift.tasks.SwiftCompile) File(java.io.File) SetProperty(org.gradle.api.provider.SetProperty) ProviderFactory(org.gradle.api.provider.ProviderFactory) DefaultSwiftBinary(org.gradle.language.swift.internal.DefaultSwiftBinary) ObjectFactory(org.gradle.api.model.ObjectFactory) DefaultSwiftXCTestBundle(org.gradle.nativeplatform.test.xctest.internal.DefaultSwiftXCTestBundle) RegularFile(org.gradle.api.file.RegularFile) InstallXCTestBundle(org.gradle.nativeplatform.test.xctest.tasks.InstallXCTestBundle) Dependency(org.gradle.api.artifacts.Dependency) Plugin(org.gradle.api.Plugin) SwiftXCTestSuite(org.gradle.nativeplatform.test.xctest.SwiftXCTestSuite) DefaultSwiftPlatform(org.gradle.language.swift.internal.DefaultSwiftPlatform) SwiftXCTestBinary(org.gradle.nativeplatform.test.xctest.SwiftXCTestBinary) DefaultSwiftXCTestBinary(org.gradle.nativeplatform.test.xctest.internal.DefaultSwiftXCTestBinary) TargetMachine(org.gradle.nativeplatform.TargetMachine) Dimensions.useHostAsDefaultTargetMachine(org.gradle.language.nativeplatform.internal.Dimensions.useHostAsDefaultTargetMachine) ProviderFactory(org.gradle.api.provider.ProviderFactory) DefaultSwiftXCTestSuite(org.gradle.nativeplatform.test.xctest.internal.DefaultSwiftXCTestSuite) ToolChainSelector(org.gradle.language.nativeplatform.internal.toolchains.ToolChainSelector) ProductionSwiftComponent(org.gradle.language.swift.ProductionSwiftComponent) SwiftComponent(org.gradle.language.swift.SwiftComponent) XCTest(org.gradle.nativeplatform.test.xctest.tasks.XCTest) SwiftPlatform(org.gradle.language.swift.SwiftPlatform) DefaultSwiftPlatform(org.gradle.language.swift.internal.DefaultSwiftPlatform)

Aggregations

SwiftPlatform (org.gradle.language.swift.SwiftPlatform)5 DefaultSwiftPlatform (org.gradle.language.swift.internal.DefaultSwiftPlatform)5 DefaultNativePlatform (org.gradle.nativeplatform.platform.internal.DefaultNativePlatform)4 ObjectFactory (org.gradle.api.model.ObjectFactory)3 ProviderFactory (org.gradle.api.provider.ProviderFactory)3 ToolChainSelector (org.gradle.language.nativeplatform.internal.toolchains.ToolChainSelector)3 Inject (javax.inject.Inject)2 Plugin (org.gradle.api.Plugin)2 Project (org.gradle.api.Project)2 ImmutableAttributesFactory (org.gradle.api.internal.attributes.ImmutableAttributesFactory)2 NativeComponentFactory (org.gradle.language.internal.NativeComponentFactory)2 Dimensions (org.gradle.language.nativeplatform.internal.Dimensions)2 Dimensions.tryToBuildOnHost (org.gradle.language.nativeplatform.internal.Dimensions.tryToBuildOnHost)2 Names (org.gradle.language.nativeplatform.internal.Names)2 SwiftApplication (org.gradle.language.swift.SwiftApplication)2 TargetMachineFactory (org.gradle.nativeplatform.TargetMachineFactory)2 NativeLanguage (org.gradle.nativeplatform.toolchain.internal.NativeLanguage)2 NativeToolChainInternal (org.gradle.nativeplatform.toolchain.internal.NativeToolChainInternal)2 PlatformToolProvider (org.gradle.nativeplatform.toolchain.internal.PlatformToolProvider)2 Lists (com.google.common.collect.Lists)1