-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathPackage.swift
More file actions
80 lines (76 loc) · 2.19 KB
/
Copy pathPackage.swift
File metadata and controls
80 lines (76 loc) · 2.19 KB
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
// swift-tools-version: 6.1
import PackageDescription
import CompilerPluginSupport
import class Foundation.ProcessInfo
// get environment variables
let environment = ProcessInfo.processInfo.environment
let dynamicLibrary = environment["SWIFT_BUILD_DYNAMIC_LIBRARY"] == "1"
// force building as dynamic library
let libraryType: PackageDescription.Product.Library.LibraryType? = dynamicLibrary ? .dynamic : nil
let package = Package(
name: "CoreModel-SQLite",
platforms: [
.macOS(.v10_15),
.iOS(.v13),
.watchOS(.v6),
.tvOS(.v13),
],
products: [
.library(
name: "CoreModelSQLite",
type: libraryType,
targets: ["CoreModelSQLite"]
)
],
dependencies: [
.package(
url: "https://github.com/PureSwift/CoreModel",
from: "2.8.0"
),
.package(
url: "https://github.com/PureSwift/SQLite",
from: "0.2.0"
)
],
targets: [
.target(
name: "CoreModelSQLite",
dependencies: [
"CoreModel",
.product(
name: "SQLite",
package: "SQLite"
)
]
),
.testTarget(
name: "CoreModelSQLiteTests",
dependencies: ["CoreModelSQLite"],
resources: [
.copy("TestFiles")
]
)
]
)
// Skip (skip.dev) Fuse (native) transpilation support
let enableSkipFuse = ProcessInfo.processInfo.environment["SKIP_FUSE"] == "1"
if enableSkipFuse {
// Skip requires higher minimum deployment targets
package.platforms = [
.macOS(.v13),
.iOS(.v16),
.watchOS(.v9),
.tvOS(.v16),
.macCatalyst(.v16),
]
package.dependencies += [
.package(url: "https://source.skip.tools/skip.git", from: "1.9.0"),
.package(url: "https://source.skip.tools/skip-fuse.git", from: "1.0.0"),
]
package.targets[0].dependencies += [
.product(name: "SkipFuse", package: "skip-fuse")
]
package.targets[0].plugins = (package.targets[0].plugins ?? []) + [
.plugin(name: "skipstone", package: "skip")
]
}