|
1 | | -// swift-tools-version:5.9 |
| 1 | +// swift-tools-version:6.2 |
| 2 | +// The swift-tools-version declares the minimum version of Swift required to build this package. |
| 3 | + |
2 | 4 | import PackageDescription |
3 | 5 |
|
4 | 6 | let package = Package( |
5 | 7 | name: "hello", |
6 | | - platforms: [ |
7 | | - .macOS(.v14), |
| 8 | + platforms: [.macOS(.v15), .iOS(.v18), .tvOS(.v18)], |
| 9 | + products: [ |
| 10 | + .executable(name: "App", targets: ["App"]), |
8 | 11 | ], |
9 | 12 | dependencies: [ |
10 | 13 | .package(url: "https://github.com/hummingbird-project/hummingbird.git", from: "2.0.0"), |
11 | | - .package(url: "https://github.com/apple/swift-argument-parser.git", from: "1.4.0"), |
| 14 | + .package(url: "https://github.com/apple/swift-configuration.git", from: "1.0.0", traits: [.defaults, "CommandLineArguments"]), |
12 | 15 | ], |
13 | 16 | targets: [ |
14 | | - .executableTarget( |
15 | | - name: "App", |
| 17 | + .executableTarget(name: "App", |
16 | 18 | dependencies: [ |
17 | | - .product(name: "ArgumentParser", package: "swift-argument-parser"), |
| 19 | + .product(name: "Configuration", package: "swift-configuration"), |
18 | 20 | .product(name: "Hummingbird", package: "hummingbird"), |
19 | 21 | ], |
20 | | - swiftSettings: [ |
21 | | - // Enable better optimizations when building in Release configuration. Despite the use of |
22 | | - // the `.unsafeFlags` construct required by SwiftPM, this flag is recommended for Release |
23 | | - // builds. See <https://github.com/swift-server/guides#building-for-production> for details. |
24 | | - .unsafeFlags(["-cross-module-optimization"], .when(configuration: .release)), |
25 | | - ] |
| 22 | + path: "Sources/App" |
26 | 23 | ), |
27 | | - .testTarget( |
28 | | - name: "AppTests", |
| 24 | + .testTarget(name: "AppTests", |
29 | 25 | dependencies: [ |
30 | 26 | .byName(name: "App"), |
31 | | - .product(name: "Hummingbird", package: "hummingbird"), |
32 | | - .product(name: "HummingbirdTesting", package: "hummingbird"), |
33 | | - ] |
34 | | - ), |
| 27 | + .product(name: "HummingbirdTesting", package: "hummingbird") |
| 28 | + ], |
| 29 | + path: "Tests/AppTests" |
| 30 | + ) |
35 | 31 | ] |
36 | 32 | ) |
0 commit comments