-
Notifications
You must be signed in to change notification settings - Fork 8
/
Package.swift
93 lines (84 loc) · 2.92 KB
/
Package.swift
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
// swift-tools-version: 5.9
// The swift-tools-version declares the minimum version of Swift required to build this package.
import PackageDescription
import CompilerPluginSupport
extension Target {
var asDependency: Target.Dependency {
Target.Dependency(stringLiteral: self.name)
}
}
let dependencies: [Package.Dependency] = [
.package(url: "https://github.com/pointfreeco/swift-snapshot-testing", exact: "1.17.4"),
.package(url: "https://github.com/yukiny0811/SimpleSimdSwift", exact: "1.0.1"),
.package(url: "https://github.com/yukiny0811/FontVertexBuilder", exact: "1.2.5"),
.package(url: "https://github.com/yukiny0811/EasyMetalShader.git", exact: "3.2.1"),
.package(url: "https://github.com/apple/swift-syntax.git", exact: "510.0.3"),
]
enum CorePackage {
static let SnapshotTesting = Target.Dependency.product(name: "SnapshotTesting", package: "swift-snapshot-testing")
static let SimpleSimdSwift = Target.Dependency.product(name: "SimpleSimdSwift", package: "SimpleSimdSwift")
static let FontVertexBuilder = Target.Dependency.product(name: "FontVertexBuilder", package: "FontVertexBuilder")
static let EasyMetalShader = Target.Dependency.product(name: "EasyMetalShader", package: "EasyMetalShader")
static let SwiftSyntaxMacros = Target.Dependency.product(name: "SwiftSyntaxMacros", package: "swift-syntax")
static let SwiftCompilerPlugin = Target.Dependency.product(name: "SwiftCompilerPlugin", package: "swift-syntax")
}
let SwiftyCreativesSound = Target.target(
name: "SwiftyCreativesSound",
dependencies: [],
path: "Sources/SwiftyCreativesSound"
)
let SwiftyCreativesMacro = Target.macro(
name: "SwiftyCreativesMacro",
dependencies: [
CorePackage.SwiftSyntaxMacros,
CorePackage.SwiftCompilerPlugin,
],
path: "Sources/SwiftyCreativesMacro"
)
let SwiftyCreatives = Target.target(
name: "SwiftyCreatives",
dependencies: [
CorePackage.SimpleSimdSwift,
CorePackage.FontVertexBuilder,
CorePackage.EasyMetalShader,
SwiftyCreativesSound.asDependency,
SwiftyCreativesMacro.asDependency,
],
path: "Sources/SwiftyCreatives",
resources: [
.process("Resources")
]
)
let SwiftyCreativesTests = Target.testTarget(
name: "SwiftyCreativesTests",
dependencies: [
SwiftyCreatives.asDependency,
CorePackage.SnapshotTesting,
],
path: "Tests/SwiftyCreativesTests",
resources: [
.process("Resources")
]
)
let package = Package(
name: "SwiftyCreatives",
platforms: [
.iOS(.v17),
.macOS(.v13),
.tvOS(.v17),
.visionOS(.v1),
],
products: [
.library(
name: "SwiftyCreatives",
targets: ["SwiftyCreatives"]
)
],
dependencies: dependencies,
targets: [
SwiftyCreativesSound,
SwiftyCreativesMacro,
SwiftyCreatives,
SwiftyCreativesTests,
]
)