Skip to content

Commit 77d48dd

Browse files
committed
setup a swift package that is an executable.
This is done by removing products from the package.swift file, set a platform to macOS, replace tartet with .executable. Add a main.swift file inside the sources folder.
1 parent c20867f commit 77d48dd

File tree

3 files changed

+13
-27
lines changed

3 files changed

+13
-27
lines changed

Diff for: Package.swift

+12-21
Original file line numberDiff line numberDiff line change
@@ -4,25 +4,16 @@
44
import PackageDescription
55

66
let package = Package(
7-
name: "concurrency",
8-
products: [
9-
// Products define the executables and libraries a package produces, and make them visible to other packages.
10-
.library(
11-
name: "concurrency",
12-
targets: ["concurrency"]),
13-
],
14-
dependencies: [
15-
// Dependencies declare other packages that this package depends on.
16-
// .package(url: /* package url */, from: "1.0.0"),
17-
],
18-
targets: [
19-
// Targets are the basic building blocks of a package. A target can define a module or a test suite.
20-
// Targets can depend on other targets in this package, and on products in packages this package depends on.
21-
.target(
22-
name: "concurrency",
23-
dependencies: []),
24-
.testTarget(
25-
name: "concurrencyTests",
26-
dependencies: ["concurrency"]),
27-
]
7+
name: "concurrency",
8+
platforms: [.macOS(.v12)],
9+
dependencies: [],
10+
targets: [
11+
.executableTarget(
12+
name: "concurrency",
13+
dependencies: []
14+
),
15+
.testTarget(
16+
name: "concurrencyTests",
17+
dependencies: ["concurrency"]),
18+
]
2819
)

Diff for: Sources/concurrency/concurrency.swift

-6
This file was deleted.

Diff for: Sources/concurrency/main.swift

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+

0 commit comments

Comments
 (0)