mirror of
https://github.com/apple/swift-async-algorithms
synced 2026-11-24 04:17:52 +00:00
# Motivation The current validation testing library has a bunch of warnings and we haven't put it through a proper API review yet. Since we are preparing for a 1.0.0, I think it is best if we remove the products for the validation targets for now and take some time to make sure the interfaces are taken through an API review. # Modification Remove products for the validation targets.
64 lines
1.8 KiB
Swift
64 lines
1.8 KiB
Swift
// swift-tools-version: 5.8
|
|
|
|
import PackageDescription
|
|
|
|
let package = Package(
|
|
name: "swift-async-algorithms",
|
|
platforms: [
|
|
.macOS("10.15"),
|
|
.iOS("13.0"),
|
|
.tvOS("13.0"),
|
|
.watchOS("6.0")
|
|
],
|
|
products: [
|
|
.library(name: "AsyncAlgorithms", targets: ["AsyncAlgorithms"]),
|
|
],
|
|
dependencies: [.package(url: "https://github.com/apple/swift-collections.git", .upToNextMajor(from: "1.0.4"))],
|
|
targets: [
|
|
.target(
|
|
name: "AsyncAlgorithms",
|
|
dependencies: [.product(name: "Collections", package: "swift-collections")],
|
|
swiftSettings: [
|
|
.enableExperimentalFeature("StrictConcurrency=complete"),
|
|
]
|
|
),
|
|
.target(
|
|
name: "AsyncSequenceValidation",
|
|
dependencies: ["_CAsyncSequenceValidationSupport", "AsyncAlgorithms"],
|
|
swiftSettings: [
|
|
.enableExperimentalFeature("StrictConcurrency=complete"),
|
|
]
|
|
),
|
|
.systemLibrary(name: "_CAsyncSequenceValidationSupport"),
|
|
.target(
|
|
name: "AsyncAlgorithms_XCTest",
|
|
dependencies: ["AsyncAlgorithms", "AsyncSequenceValidation"],
|
|
swiftSettings: [
|
|
.enableExperimentalFeature("StrictConcurrency=complete"),
|
|
]
|
|
),
|
|
.testTarget(
|
|
name: "AsyncAlgorithmsTests",
|
|
dependencies: ["AsyncAlgorithms", "AsyncSequenceValidation", "AsyncAlgorithms_XCTest"],
|
|
swiftSettings: [
|
|
.enableExperimentalFeature("StrictConcurrency=complete"),
|
|
]
|
|
),
|
|
]
|
|
)
|
|
|
|
#if canImport(Darwin)
|
|
import Darwin
|
|
let buildingDocs = getenv("BUILDING_FOR_DOCUMENTATION_GENERATION") != nil
|
|
#elseif canImport(Glibc)
|
|
import Glibc
|
|
let buildingDocs = getenv("BUILDING_FOR_DOCUMENTATION_GENERATION") != nil
|
|
#else
|
|
let buildingDocs = false
|
|
#endif
|
|
|
|
// Only require the docc plugin when building documentation
|
|
package.dependencies += buildingDocs ? [
|
|
.package(url: "https://github.com/apple/swift-docc-plugin", from: "1.0.0"),
|
|
] : []
|