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);
}
});
}
Aggregations