Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,9 @@ jobs:
runs-on: ubuntu-22.04
steps:
- name: Install Swift
# WORKAROUND:https://github.com/swift-actions/setup-swift/pull/680
uses: swift-actions/setup-swift@bb83339d1e8577741bdc6c65ba551ce7dc0fb854
uses: swift-actions/setup-swift@v2
with:
swift-version: '5.10.1'
swift-version: '6.0.3'

- uses: actions/checkout@v4

Expand Down
24 changes: 21 additions & 3 deletions Package.resolved

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

32 changes: 13 additions & 19 deletions Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

import PackageDescription

let linuxPlatforms: [Platform] = [.linux, .openbsd]

let package = Package(
name: "MachOKit",
platforms: [
Expand Down Expand Up @@ -35,7 +37,11 @@ let package = Package(
),
.package(
url: "https://github.com/p-x9/ObjectArchiveKit.git",
from: "0.3.0"
from: "0.5.0"
),
.package(
url: "https://github.com/apple/swift-crypto.git",
"1.0.0" ..< "4.0.0"
),
],
targets: [
Expand All @@ -44,7 +50,12 @@ let package = Package(
dependencies: [
"MachOKitC",
.product(name: "FileIO", package: "swift-fileio"),
.product(name: "FileIOBinary", package: "swift-fileio-extra")
.product(name: "FileIOBinary", package: "swift-fileio-extra"),
.product(
name: "Crypto",
package: "swift-crypto",
condition: .when(platforms: linuxPlatforms)
)
],
swiftSettings: SwiftSetting.allCases + [
.enableExperimentalFeature("AccessLevelOnImport", .when(configuration: .debug))
Expand Down Expand Up @@ -102,23 +113,6 @@ if isForBinaryKitFramework {
]
}

// MARK: - Crypto

#if (os(macOS) || os(iOS) || os(watchOS) || os(tvOS)) && canImport(CommonCrypto)
/* Do Nothing */
#else
package.dependencies += [
.package(url: "https://github.com/apple/swift-crypto.git", "1.0.0" ..< "4.0.0")
]

machOKit?.dependencies += [
.product(
name: "Crypto",
package: "swift-crypto"
)
]
#endif

// https://github.com/treastrain/swift-upcomingfeatureflags-cheatsheet
extension SwiftSetting {
static let forwardTrailingClosures: Self = .enableUpcomingFeature("ForwardTrailingClosures") // SE-0286, Swift 5.3, SwiftPM 5.8+
Expand Down
Loading