-
-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathPackage.swift
125 lines (123 loc) · 5.33 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
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
// swift-tools-version:5.5
import PackageDescription
let package = Package(
name: "Bagbutik",
platforms: [
.macOS(.v12),
.iOS(.v15),
.tvOS(.v15),
.watchOS(.v8)
],
products: [
.library(
// Includes all targets. Each target still needs to be imported in code.
name: "Bagbutik",
targets: [
"Bagbutik-Core",
"Bagbutik-Models",
"Bagbutik-AppStore",
"Bagbutik-GameCenter",
"Bagbutik-Marketplaces",
"Bagbutik-Provisioning",
"Bagbutik-Reporting",
"Bagbutik-TestFlight",
"Bagbutik-Users",
"Bagbutik-XcodeCloud",
]),
.library(
// Has the core features like the service, JWT and general models.
name: "Bagbutik-Core",
targets: ["Bagbutik-Core"]),
.library(
// All models used by the endpoints.
name: "Bagbutik-Models",
targets: ["Bagbutik-Models"]),
.library(
name: "Bagbutik-AppStore",
targets: ["Bagbutik-AppStore"]),
.library(
name: "Bagbutik-GameCenter",
targets: ["Bagbutik-GameCenter"]),
.library(
name: "Bagbutik-Marketplaces",
targets: ["Bagbutik-Marketplaces"]),
.library(
name: "Bagbutik-Provisioning",
targets: ["Bagbutik-Provisioning"]),
.library(
name: "Bagbutik-Reporting",
targets: ["Bagbutik-Reporting"]),
.library(
name: "Bagbutik-TestFlight",
targets: ["Bagbutik-TestFlight"]),
.library(
name: "Bagbutik-Users",
targets: ["Bagbutik-Users"]),
.library(
name: "Bagbutik-XcodeCloud",
targets: ["Bagbutik-XcodeCloud"]),
.executable(
name: "bagbutik-cli",
targets: ["BagbutikCLI"])
],
dependencies: [
.package(url: "https://github.com/apple/swift-argument-parser", from: "1.5.0"),
.package(url: "https://github.com/nicklockwood/SwiftFormat", from: "0.54.5"),
.package(url: "https://github.com/apple/swift-crypto", from: "3.8.0"),
],
targets: [
.target(name: "Bagbutik-Core", dependencies: [
.product(name: "Crypto", package: "swift-crypto", condition: .when(platforms: [.linux])),
.target(name: "system-zlib", condition: .when(platforms: [.linux])),
.target(name: "BagbutikPolyfill", condition: .when(platforms: [.linux]))
]),
.target(name: "Bagbutik-Models", dependencies: ["Bagbutik-Core"]),
.target(name: "Bagbutik-AppStore", dependencies: ["Bagbutik-Core", "Bagbutik-Models"]),
.target(name: "Bagbutik-GameCenter", dependencies: ["Bagbutik-Core", "Bagbutik-Models"]),
.target(name: "Bagbutik-Marketplaces", dependencies: ["Bagbutik-Core", "Bagbutik-Models"]),
.target(name: "Bagbutik-Provisioning", dependencies: ["Bagbutik-Core", "Bagbutik-Models"]),
.target(name: "Bagbutik-Reporting", dependencies: ["Bagbutik-Core", "Bagbutik-Models"]),
.target(name: "Bagbutik-TestFlight", dependencies: ["Bagbutik-Core", "Bagbutik-Models"]),
.target(name: "Bagbutik-Users", dependencies: ["Bagbutik-Core", "Bagbutik-Models"]),
.target(name: "Bagbutik-XcodeCloud", dependencies: ["Bagbutik-Core", "Bagbutik-Models"]),
.executableTarget(
name: "BagbutikCLI",
dependencies: [
"BagbutikGenerator",
"BagbutikDocsCollector",
.target(name: "BagbutikPolyfill", condition: .when(platforms: [.linux])),
.product(name: "ArgumentParser", package: "swift-argument-parser")
]),
// Internal targets
.target(
name: "BagbutikGenerator",
dependencies: [
"BagbutikDocsCollector",
"BagbutikSpecDecoder",
"BagbutikStringExtensions",
"SwiftFormat"
]),
.target(name: "BagbutikDocsCollector", dependencies: [
"BagbutikSpecDecoder",
.target(name: "BagbutikPolyfill", condition: .when(platforms: [.linux]))
]),
.target(name: "BagbutikSpecDecoder", dependencies: ["BagbutikStringExtensions"]),
.target(name: "BagbutikStringExtensions"),
.target(name: "BagbutikPolyfill"),
.target(name: "system-zlib"),
// Test targets
.testTarget(
name: "Bagbutik-CoreTests",
dependencies: [
"Bagbutik-Core",
"Bagbutik-AppStore",
.product(name: "Crypto", package: "swift-crypto", condition: .when(platforms: [.linux]))
],
resources: [.copy("test-private-key.p8")]),
.testTarget(name: "Bagbutik-ModelsTests", dependencies: ["Bagbutik-Models"]),
.testTarget(name: "BagbutikGeneratorTests", dependencies: ["BagbutikGenerator"]),
.testTarget(name: "BagbutikDocsCollectorTests", dependencies: ["BagbutikDocsCollector"]),
.testTarget(name: "BagbutikSpecDecoderTests", dependencies: ["BagbutikSpecDecoder"]),
.testTarget(name: "BagbutikStringExtensionsTests", dependencies: ["BagbutikStringExtensions"]),
],
swiftLanguageVersions: [.v5, .version("6")])