Skip to content

Commit

Permalink
Setting up Package for Swift 6
Browse files Browse the repository at this point in the history
  • Loading branch information
leogdion committed Nov 5, 2024
1 parent dd1bf23 commit 6d7e4a6
Show file tree
Hide file tree
Showing 2 changed files with 78 additions and 8 deletions.
16 changes: 8 additions & 8 deletions Package.resolved
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
"kind" : "remoteSourceControl",
"location" : "https://github.com/mattpolzin/OpenAPIKit",
"state" : {
"revision" : "4991b7e39a19cd1d0d11fe24fc64a601b4820144",
"version" : "3.2.0"
"revision" : "5b5ee49624dda5b3e3b85aff184f44a007862fb7",
"version" : "3.3.0"
}
},
{
Expand Down Expand Up @@ -41,8 +41,8 @@
"kind" : "remoteSourceControl",
"location" : "https://github.com/apple/swift-collections",
"state" : {
"revision" : "9bf03ff58ce34478e66aaee630e491823326fd06",
"version" : "1.1.3"
"revision" : "671108c96644956dddcd89dd59c203dcdb36cec7",
"version" : "1.1.4"
}
},
{
Expand All @@ -68,17 +68,17 @@
"kind" : "remoteSourceControl",
"location" : "https://github.com/apple/swift-openapi-generator",
"state" : {
"revision" : "99859083e53912612b56b4b8713a971c20dab3ef",
"version" : "1.3.0"
"revision" : "9727261219af435e7e668b8813187e9bf5d61927",
"version" : "1.4.0"
}
},
{
"identity" : "swift-openapi-runtime",
"kind" : "remoteSourceControl",
"location" : "https://github.com/apple/swift-openapi-runtime",
"state" : {
"revision" : "26e8ae3515d1ff3607e924ac96fc0094775f55e8",
"version" : "1.5.0"
"revision" : "daa2fb54fe4a7f5187d7286047d5144c8cb97477",
"version" : "1.6.0"
}
},
{
Expand Down
70 changes: 70 additions & 0 deletions [email protected]
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
// swift-tools-version: 5.9
// swiftlint:disable explicit_acl explicit_top_level_acl
import PackageDescription

let swiftSettings: [SwiftSetting] = [
SwiftSetting.enableExperimentalFeature("AccessLevelOnImport"),
SwiftSetting.enableExperimentalFeature("BitwiseCopyable"),
SwiftSetting.enableExperimentalFeature("GlobalActorIsolatedTypesUsability"),
SwiftSetting.enableExperimentalFeature("IsolatedAny"),
SwiftSetting.enableExperimentalFeature("MoveOnlyPartialConsumption"),
SwiftSetting.enableExperimentalFeature("NestedProtocols"),
SwiftSetting.enableExperimentalFeature("NoncopyableGenerics"),
SwiftSetting.enableExperimentalFeature("RegionBasedIsolation"),
SwiftSetting.enableExperimentalFeature("TransferringArgsAndResults"),
SwiftSetting.enableExperimentalFeature("VariadicGenerics"),

SwiftSetting.enableUpcomingFeature("FullTypedThrows"),
SwiftSetting.enableUpcomingFeature("InternalImportsByDefault")

// SwiftSetting.unsafeFlags([
// "-Xfrontend",
// "-warn-long-function-bodies=100"
// ]),
// SwiftSetting.unsafeFlags([
// "-Xfrontend",
// "-warn-long-expression-type-checking=100"
// ])
]

let package = Package(
name: "IPSWDownloads",
platforms: [.macOS(.v10_15), .iOS(.v13), .tvOS(.v13), .watchOS(.v6), .visionOS(.v1)],
products: [
.library(name: "IPSWDownloads", targets: ["IPSWDownloads"])
],
dependencies: [
.package(
url: "https://github.com/brightdigit/OperatingSystemVersion",
from: "1.0.0-beta.1"
),
.package(
url: "https://github.com/apple/swift-openapi-generator",
from: "1.0.0"
),
.package(
url: "https://github.com/apple/swift-openapi-runtime",
from: "1.0.0"
),
.package(
url: "https://github.com/apple/swift-openapi-urlsession",
from: "1.0.0"
)
],
targets: [
.target(
name: "IPSWDownloads",
dependencies: [
.product(name: "OperatingSystemVersion", package: "OperatingSystemVersion"),
.product(name: "OpenAPIRuntime", package: "swift-openapi-runtime"),
.product(name: "OpenAPIURLSession", package: "swift-openapi-urlsession")
],
swiftSettings: swiftSettings
),
.testTarget(
name: "IPSWDownloadsTests",
dependencies: ["IPSWDownloads"]
)
]
)
// swiftlint:enable explicit_acl explicit_top_level_acl

0 comments on commit 6d7e4a6

Please sign in to comment.