iOS/Sources/PushServer/Package.swift
mat1th 97834bfd5e
Update swift lint and format + appy fixes (#2585)
## Summary
Swift lint and swiftformat are outdated. This PR does update those +
applies the new formatting form swiftformat.
There is 1 swift file with a manual change:
`Sources/Vehicle/Templates/Areas/CarPlayAreasViewModel.swift`. This is
done because `swiftlint` did create the following swiftlint error:
`error: Cyclomatic Complexity Violation: Function should have complexity
10 or less; currently complexity is 11 (cyclomatic_complexity)`.

Because it does change a lot of files the question is if we want to
finetune the `swiftformat` rules.

## Screenshots
No user facing changes.

## Link to pull request in Documentation repository
NA

## Any other notes
NA
2024-02-22 13:06:39 +01:00

58 lines
2.0 KiB
Swift

// swift-tools-version:5.5
import PackageDescription
let package = Package(
name: "PushServer",
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/vapor/apns.git", from: "2.0.0"),
.package(url: "https://github.com/vapor/redis.git", from: "4.5.0"),
.package(name: "SharedPush", path: "SharedPush"),
],
targets: [
.target(
name: "App",
dependencies: [
.product(name: "SharedPush", package: "SharedPush"),
.product(name: "Vapor", package: "vapor"),
.product(name: "APNS", package: "apns"),
.product(name: "Redis", package: "redis"),
],
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
// <https://github.com/swift-server/guides/blob/main/docs/building.md#building-for-production> 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"),
]
),
.testTarget(
name: "SharedPushTests",
dependencies: [
.product(name: "SharedPush", package: "SharedPush"),
],
resources: [
.copy("notification_test_cases.bundle"),
]
),
]
)