-
-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathPackage.swift
More file actions
37 lines (35 loc) · 1.59 KB
/
Copy pathPackage.swift
File metadata and controls
37 lines (35 loc) · 1.59 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
// swift-tools-version: 5.9
// This is a Skip (https://skip.dev) package.
import PackageDescription
let package = Package(
name: "skip-marketplace",
defaultLocalization: "en",
platforms: [.iOS(.v17), .macOS(.v14)],
products: [
.library(name: "SkipMarketplace", type: .dynamic, targets: ["SkipMarketplace"]),
],
dependencies: [
.package(url: "https://source.skip.tools/skip.git", from: "1.6.27"),
.package(url: "https://source.skip.tools/skip-ui.git", from: "1.0.0")
],
targets: [
.target(name: "SkipMarketplace", dependencies: [
.product(name: "SkipUI", package: "skip-ui")
], resources: [.process("Resources")], plugins: [.plugin(name: "skipstone", package: "skip")]),
.testTarget(name: "SkipMarketplaceTests", dependencies: [
"SkipMarketplace",
.product(name: "SkipTest", package: "skip")
], resources: [.process("Resources")], plugins: [.plugin(name: "skipstone", package: "skip")]),
]
)
if Context.environment["SKIP_BRIDGE"] ?? "0" != "0" {
package.dependencies += [.package(url: "https://source.skip.tools/skip-fuse-ui.git", from: "1.0.0")]
package.targets.forEach({ target in
target.dependencies += [.product(name: "SkipFuseUI", package: "skip-fuse-ui")]
})
// all library types must be dynamic to support bridging
package.products = package.products.map({ product in
guard let libraryProduct = product as? Product.Library else { return product }
return .library(name: libraryProduct.name, type: .dynamic, targets: libraryProduct.targets)
})
}