diff --git a/Package.swift b/Package.swift new file mode 100644 index 0000000..b5b9589 --- /dev/null +++ b/Package.swift @@ -0,0 +1,38 @@ +// swift-tools-version:5.6 +import PackageDescription + +let package = Package( + name: "FlurSchnaps-Server", + platforms: [ + .macOS(.v12) + ], + dependencies: [ + // 💧 A server-side Swift web framework. + .package(url: "https://github.com/vapor/vapor.git", from: "4.0.0"), + .package(url: "https://github.com/swift-server-community/APNSwift.git", from: "5.0.0-alpha.1"), + .package(url: "https://github.com/uraimo/SwiftyGPIO.git", from: "1.0.0"), + .package(url: "https://github.com/christophhagen/BinaryCodable.git", from: "1.0.0"), + ], + targets: [ + .target( + name: "App", + dependencies: [ + .product(name: "Vapor", package: "vapor"), + .product(name: "APNSwift", package: "apnswift"), + .product(name: "BinaryCodable", package: "BinaryCodable"), + .product(name: "SwiftyGPIO", package: "SwiftyGPIO"), + ], + swiftSettings: [ + // Enable better optimizations when building in Release configuration. Despite the use of + // the `.unsafeFlags` construct required by SwiftPM, this flag is recommended for Release + // builds. See for details. + .unsafeFlags(["-cross-module-optimization"], .when(configuration: .release)) + ] + ), + .executableTarget(name: "Run", dependencies: [.target(name: "App")]), + .testTarget(name: "AppTests", dependencies: [ + .target(name: "App"), + .product(name: "XCTVapor", package: "vapor"), + ]) + ] +)