Search in sources :

Example 1 with GenerateSwiftPackageManagerManifest

use of org.gradle.swiftpm.tasks.GenerateSwiftPackageManagerManifest in project gradle by gradle.

the class SwiftPackageManagerExportPlugin method apply.

@Override
public void apply(final Project project) {
    final GenerateSwiftPackageManagerManifest manifestTask = project.getTasks().create("generateSwiftPmManifest", GenerateSwiftPackageManagerManifest.class);
    manifestTask.getManifestFile().set(project.getLayout().getProjectDirectory().file("Package.swift"));
    // Defer attaching the model until all components have been (most likely) configured
    // TODO - make this relationship explicit to make this more reliable and offer better diagnostics
    project.afterEvaluate(new Action<Project>() {

        @Override
        public void execute(Project project) {
            Provider<Package> products = project.getProviders().provider(new MemoizingCallable(new PackageFactory(project)));
            manifestTask.getPackage().set(products);
        }
    });
}
Also used : Project(org.gradle.api.Project) GenerateSwiftPackageManagerManifest(org.gradle.swiftpm.tasks.GenerateSwiftPackageManagerManifest) Provider(org.gradle.api.provider.Provider)

Aggregations

Project (org.gradle.api.Project)1 Provider (org.gradle.api.provider.Provider)1 GenerateSwiftPackageManagerManifest (org.gradle.swiftpm.tasks.GenerateSwiftPackageManagerManifest)1