Skip to content

Commit

Permalink
Add package manifest for 6
Browse files Browse the repository at this point in the history
  • Loading branch information
giginet committed Jul 6, 2024
1 parent 205cb96 commit 8b9c5b2
Show file tree
Hide file tree
Showing 2 changed files with 93 additions and 3 deletions.
7 changes: 4 additions & 3 deletions Package.swift
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// swift-tools-version: 5.10
// swift-tools-version: 6.0
// The swift-tools-version declares the minimum version of Swift required to build this package.

import PackageDescription
Expand All @@ -23,7 +23,7 @@ let package = Package(
],
dependencies: [
.package(url: "https://github.com/apple/swift-package-manager.git",
revision: "swift-5.10-RELEASE"),
branch: "release/6.0"),
.package(url: "https://github.com/apple/swift-log.git",
from: "1.5.2"),
.package(url: "https://github.com/apple/swift-collections",
Expand Down Expand Up @@ -75,7 +75,8 @@ let package = Package(
resources: [.copy("Resources/Fixtures")],
swiftSettings: swiftSettings
),
]
],
swiftLanguageVersions: [.v6]
)

let isDevelopment = ProcessInfo.processInfo.environment["SCIPIO_DEVELOPMENT"] == "1"
Expand Down
89 changes: 89 additions & 0 deletions Package@swift-5.10.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
// swift-tools-version: 5.10
// The swift-tools-version declares the minimum version of Swift required to build this package.

import PackageDescription
import Foundation

let swiftSettings: [SwiftSetting] = [
.enableExperimentalFeature("StrictConcurrency"),
.unsafeFlags(["-strict-concurrency=complete"]),
]

let package = Package(
name: "Scipio",
platforms: [
.macOS(.v13),
],
products: [
.executable(name: "scipio",
targets: ["scipio"]),
.library(
name: "ScipioKit",
targets: ["ScipioKit"]),
],
dependencies: [
.package(url: "https://github.com/apple/swift-package-manager.git",
revision: "swift-5.10-RELEASE"),
.package(url: "https://github.com/apple/swift-log.git",
from: "1.5.2"),
.package(url: "https://github.com/apple/swift-collections",
from: "1.0.4"),
.package(url: "https://github.com/apple/swift-argument-parser.git",
from: "1.1.0"),
.package(url: "https://github.com/apple/swift-algorithms.git",
from: "1.0.0"),
.package(url: "https://github.com/onevcat/Rainbow",
.upToNextMinor(from: "4.0.1")),
.package(url: "https://github.com/giginet/scipio-cache-storage.git",
from: "1.0.0"),
],
targets: [
.executableTarget(
name: "scipio",
dependencies: [
.target(name: "ScipioKit"),
.product(name: "ArgumentParser", package: "swift-argument-parser"),
],
swiftSettings: swiftSettings
),
.target(
name: "ScipioKit",
dependencies: [
.product(name: "SwiftPMDataModel-auto", package: "swift-package-manager"),
.product(name: "XCBuildSupport", package: "swift-package-manager"),
.product(name: "Logging", package: "swift-log"),
.product(name: "Collections", package: "swift-collections"),
.product(name: "Algorithms", package: "swift-algorithms"),
.product(name: "Rainbow", package: "Rainbow"),
.product(name: "ScipioStorage", package: "scipio-cache-storage"),
],
swiftSettings: swiftSettings,
plugins: [
.plugin(name: "GenerateScipioVersion")
]
),
.plugin(
name: "GenerateScipioVersion",
capability: .buildTool()
),
.testTarget(
name: "ScipioKitTests",
dependencies: [
.target(name: "ScipioKit"),
],
exclude: ["Resources/Fixtures/"],
resources: [.copy("Resources/Fixtures")],
swiftSettings: swiftSettings
),
]
)

let isDevelopment = ProcessInfo.processInfo.environment["SCIPIO_DEVELOPMENT"] == "1"

// swift-docs is not needed for package users
if isDevelopment {
package.dependencies += [
.package(url: "https://github.com/apple/swift-docc-plugin", from: "1.3.0"),
.package(url: "https://github.com/freddi-kit/ArtifactBundleGen.git", from: "0.0.6"),
]
}

0 comments on commit 8b9c5b2

Please sign in to comment.