4
4
import Foundation
5
5
import PackageDescription
6
6
7
- var dependencies : [ Package . Dependency ] = [
8
- . package ( url: " https://github.com/pointfreeco/swift-snapshot-testing " , from: " 1.8.1 " ) ,
9
- . package ( url: " https://github.com/pointfreeco/xctest-dynamic-overlay " , from: " 1.0.0 " ) ,
10
- . package ( url: " https://github.com/pointfreeco/swift-concurrency-extras " , from: " 1.0.0 " ) ,
11
- . package ( url: " https://github.com/apple/swift-crypto.git " , " 1.0.0 " ..< " 4.0.0 " ) ,
12
- . package ( url: " https://github.com/pointfreeco/swift-custom-dump " , from: " 1.0.0 " ) ,
13
- ]
14
-
15
- var goTrueDependencies : [ Target . Dependency ] = [
16
- " _Helpers " ,
17
- . product( name: " ConcurrencyExtras " , package : " swift-concurrency-extras " ) ,
18
- . product( name: " Crypto " , package : " swift-crypto " ) ,
19
- ]
20
-
21
- #if !os(Windows) && !os(Linux)
22
- dependencies += [
23
- . package ( url: " https://github.com/kishikawakatsumi/KeychainAccess " , from: " 4.2.2 " ) ,
24
- ]
25
- goTrueDependencies += [
26
- . product( name: " KeychainAccess " , package : " KeychainAccess " ) ,
27
- ]
28
- #endif
29
-
30
7
let package = Package (
31
8
name: " Supabase " ,
32
9
platforms: [
@@ -37,17 +14,21 @@ let package = Package(
37
14
. tvOS( . v13) ,
38
15
] ,
39
16
products: [
40
- . library( name: " Functions " , targets: [ " Functions " ] ) ,
41
17
. library( name: " Auth " , targets: [ " Auth " ] ) ,
18
+ . library( name: " Functions " , targets: [ " Functions " ] ) ,
42
19
. library( name: " PostgREST " , targets: [ " PostgREST " ] ) ,
43
20
. library( name: " Realtime " , targets: [ " Realtime " ] ) ,
44
21
. library( name: " Storage " , targets: [ " Storage " ] ) ,
45
- . library(
46
- name: " Supabase " ,
47
- targets: [ " Supabase " , " Functions " , " PostgREST " , " Auth " , " Realtime " , " Storage " ]
48
- ) ,
22
+ . library( name: " Supabase " , targets: [ " Supabase " , " Functions " , " PostgREST " , " Auth " , " Realtime " , " Storage " ] ) ,
23
+ ] ,
24
+ dependencies: [
25
+ . package ( url: " https://github.com/apple/swift-crypto.git " , " 1.0.0 " ..< " 4.0.0 " ) ,
26
+ . package ( url: " https://github.com/pointfreeco/swift-concurrency-extras " , from: " 1.0.0 " ) ,
27
+ . package ( url: " https://github.com/pointfreeco/swift-custom-dump " , from: " 1.0.0 " ) ,
28
+ . package ( url: " https://github.com/pointfreeco/swift-snapshot-testing " , from: " 1.8.1 " ) ,
29
+ . package ( url: " https://github.com/pointfreeco/xctest-dynamic-overlay " , from: " 1.0.0 " ) ,
30
+ . package ( url: " https://github.com/kishikawakatsumi/KeychainAccess " , from: " 4.2.2 " ) ,
49
31
] ,
50
- dependencies: dependencies,
51
32
targets: [
52
33
. target(
53
34
name: " _Helpers " ,
@@ -58,53 +39,66 @@ let package = Package(
58
39
. testTarget(
59
40
name: " _HelpersTests " ,
60
41
dependencies: [
61
- " _Helpers " ,
62
42
. product( name: " CustomDump " , package : " swift-custom-dump " ) ,
43
+ " _Helpers " ,
63
44
]
64
45
) ,
65
- . target( name: " Functions " , dependencies: [ " _Helpers " ] ) ,
66
- . testTarget(
67
- name: " FunctionsTests " ,
46
+ . target(
47
+ name: " Auth " ,
68
48
dependencies: [
69
- " Functions " ,
70
- " TestHelpers " ,
71
49
. product( name: " ConcurrencyExtras " , package : " swift-concurrency-extras " ) ,
72
- . product( name: " SnapshotTesting " , package : " swift-snapshot-testing " ) ,
73
- . product( name: " XCTestDynamicOverlay " , package : " xctest-dynamic-overlay " ) ,
50
+ . product( name: " Crypto " , package : " swift-crypto " ) ,
51
+ . product(
52
+ name: " KeychainAccess " ,
53
+ package : " KeychainAccess " ,
54
+ condition: . when(
55
+ platforms: [ . macOS, . iOS, . macCatalyst, . visionOS, . tvOS, . watchOS]
56
+ )
57
+ ) ,
58
+ " _Helpers " ,
74
59
]
75
60
) ,
76
61
. testTarget(
77
- name: " IntegrationTests " ,
62
+ name: " AuthTests " ,
78
63
dependencies: [
79
64
. product( name: " CustomDump " , package : " swift-custom-dump " ) ,
65
+ . product( name: " SnapshotTesting " , package : " swift-snapshot-testing " ) ,
80
66
. product( name: " XCTestDynamicOverlay " , package : " xctest-dynamic-overlay " ) ,
81
- . product( name: " InlineSnapshotTesting " , package : " swift-snapshot-testing " ) ,
82
67
" _Helpers " ,
83
68
" Auth " ,
84
69
" TestHelpers " ,
85
- " PostgREST " ,
86
- " Realtime " ,
87
- " Storage " ,
88
- ]
70
+ ] ,
71
+ exclude: [
72
+ " __Snapshots__ " ,
73
+ ] ,
74
+ resources: [ . process( " Resources " ) ]
89
75
) ,
90
- . target(
91
- name: " Auth " ,
92
- dependencies: goTrueDependencies
76
+ . target( name: " Functions " , dependencies: [ " _Helpers " ] ) ,
77
+ . testTarget(
78
+ name: " FunctionsTests " ,
79
+ dependencies: [
80
+ . product( name: " ConcurrencyExtras " , package : " swift-concurrency-extras " ) ,
81
+ . product( name: " SnapshotTesting " , package : " swift-snapshot-testing " ) ,
82
+ . product( name: " XCTestDynamicOverlay " , package : " xctest-dynamic-overlay " ) ,
83
+ " Functions " ,
84
+ " TestHelpers " ,
85
+ ] ,
86
+ exclude: [ " __Snapshots__ " ]
93
87
) ,
94
88
. testTarget(
95
- name: " AuthTests " ,
89
+ name: " IntegrationTests " ,
96
90
dependencies: [
97
91
. product( name: " CustomDump " , package : " swift-custom-dump " ) ,
98
- . product( name: " SnapshotTesting " , package : " swift-snapshot-testing " ) ,
92
+ . product( name: " InlineSnapshotTesting " , package : " swift-snapshot-testing " ) ,
99
93
. product( name: " XCTestDynamicOverlay " , package : " xctest-dynamic-overlay " ) ,
100
94
" _Helpers " ,
101
95
" Auth " ,
96
+ " PostgREST " ,
97
+ " Realtime " ,
98
+ " Storage " ,
102
99
" TestHelpers " ,
103
100
] ,
104
- exclude: [
105
- " __Snapshots__ " ,
106
- ] ,
107
- resources: [ . process( " Resources " ) ]
101
+ resources: [ . process( " Fixtures " ) ]
108
102
) ,
109
103
. target(
110
104
name: " PostgREST " ,
@@ -116,9 +110,9 @@ let package = Package(
116
110
. testTarget(
117
111
name: " PostgRESTTests " ,
118
112
dependencies: [
119
- " PostgREST " ,
120
- " _Helpers " ,
121
113
. product( name: " SnapshotTesting " , package : " swift-snapshot-testing " ) ,
114
+ " _Helpers " ,
115
+ " PostgREST " ,
122
116
] ,
123
117
exclude: [ " __Snapshots__ " ]
124
118
) ,
@@ -132,37 +126,37 @@ let package = Package(
132
126
. testTarget(
133
127
name: " RealtimeTests " ,
134
128
dependencies: [
135
- " Realtime " ,
129
+ . product ( name : " CustomDump " , package : " swift-custom-dump " ) ,
136
130
" PostgREST " ,
131
+ " Realtime " ,
137
132
" TestHelpers " ,
138
- . product( name: " CustomDump " , package : " swift-custom-dump " ) ,
139
133
]
140
134
) ,
141
135
. target( name: " Storage " , dependencies: [ " _Helpers " ] ) ,
142
136
. testTarget(
143
137
name: " StorageTests " ,
144
138
dependencies: [
145
- " Storage " ,
146
- . product( name: " XCTestDynamicOverlay " , package : " xctest-dynamic-overlay " ) ,
147
139
. product( name: " CustomDump " , package : " swift-custom-dump " ) ,
140
+ . product( name: " XCTestDynamicOverlay " , package : " xctest-dynamic-overlay " ) ,
141
+ " Storage " ,
148
142
]
149
143
) ,
150
144
. target(
151
145
name: " Supabase " ,
152
146
dependencies: [
153
147
. product( name: " ConcurrencyExtras " , package : " swift-concurrency-extras " ) ,
154
148
" Auth " ,
155
- " Storage " ,
156
- " Realtime " ,
157
- " PostgREST " ,
158
149
" Functions " ,
150
+ " PostgREST " ,
151
+ " Realtime " ,
152
+ " Storage " ,
159
153
]
160
154
) ,
161
155
. testTarget(
162
156
name: " SupabaseTests " ,
163
157
dependencies: [
164
- " Supabase " ,
165
158
. product( name: " CustomDump " , package : " swift-custom-dump " ) ,
159
+ " Supabase " ,
166
160
]
167
161
) ,
168
162
. target(
0 commit comments