-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathproject.yml
335 lines (323 loc) · 10.8 KB
/
project.yml
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
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
name: "Coder-Desktop"
options:
bundleIdPrefix: com.coder
deploymentTarget:
macOS: "14.0"
xcodeVersion: "1600"
minimumXcodeGenVersion: "2.42.0"
fileTypes:
proto:
buildPhase: none
settings:
base:
MARKETING_VERSION: ${MARKETING_VERSION} # Sets the version number.
CURRENT_PROJECT_VERSION: ${CURRENT_PROJECT_VERSION} # Sets the build number.
ALWAYS_SEARCH_USER_PATHS: NO
ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS: YES
COPY_PHASE_STRIP: NO
DEAD_CODE_STRIPPING: YES
DEVELOPMENT_TEAM: "4399GN35BJ"
GENERATE_INFOPLIST_FILE: YES
PRODUCT_NAME: "$(TARGET_NAME)"
SWIFT_VERSION: ${SWIFT_VERSION}
ENABLE_USER_SCRIPT_SANDBOXING: YES
LD_RUNPATH_SEARCH_PATHS:
- "$(inherited)"
- "@executable_path/../Frameworks"
- "@loader_path/Frameworks"
GCC_C_LANGUAGE_STANDARD: gnu17
CLANG_CXX_LANGUAGE_STANDARD: "gnu++20"
CLANG_ENABLE_MODULES: YES
CLANG_ENABLE_OBJC_ARC: YES
CLANG_ENABLE_OBJC_WEAK: YES
ENABLE_STRICT_OBJC_MSGSEND: YES
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING: YES
CLANG_WARN_BOOL_CONVERSION: YES
CLANG_WARN_COMMA: YES
CLANG_WARN_CONSTANT_CONVERSION: YES
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS: YES
CLANG_WARN_DIRECT_OBJC_ISA_USAGE: YES_ERROR
CLANG_WARN_DOCUMENTATION_COMMENTS: YES
CLANG_WARN_EMPTY_BODY: YES
CLANG_WARN_ENUM_CONVERSION: YES
CLANG_WARN_INFINITE_RECURSION: YES
CLANG_WARN_INT_CONVERSION: YES
CLANG_WARN_NON_LITERAL_NULL_CONVERSION: YES
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF: YES
CLANG_WARN_OBJC_LITERAL_CONVERSION: YES
CLANG_WARN_OBJC_ROOT_CLASS: YES_ERROR
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER: YES
CLANG_WARN_RANGE_LOOP_ANALYSIS: YES
CLANG_WARN_STRICT_PROTOTYPES: YES
CLANG_WARN_SUSPICIOUS_MOVE: YES
CLANG_WARN_UNGUARDED_AVAILABILITY: YES_AGGRESSIVE
CLANG_WARN_UNREACHABLE_CODE: YES
CLANG_WARN__DUPLICATE_METHOD_MATCH: YES
GCC_WARN_64_TO_32_BIT_CONVERSION: YES
GCC_WARN_ABOUT_RETURN_TYPE: YES_ERROR
GCC_WARN_UNDECLARED_SELECTOR: YES
GCC_WARN_UNINITIALIZED_AUTOS: YES_AGGRESSIVE
GCC_WARN_UNUSED_FUNCTION: YES
GCC_WARN_UNUSED_VARIABLE: YES
GCC_NO_COMMON_BLOCKS: YES
CLANG_ANALYZER_NONNULL: YES
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION: YES_AGGRESSIVE
MTL_FAST_MATH: YES
LOCALIZATION_PREFERS_STRING_CATALOGS: YES
configs:
debug:
GCC_PREPROCESSOR_DEFINITIONS:
- "DEBUG=1"
- "$(inherited)"
ONLY_ACTIVE_ARCH: YES
SWIFT_ACTIVE_COMPILATION_CONDITIONS: "DEBUG $(inherited)"
SWIFT_OPTIMIZATION_LEVEL: "-Onone"
GCC_OPTIMIZATION_LEVEL: 0
DEBUG_INFORMATION_FORMAT: dwarf
ENABLE_TESTABILITY: YES
MTL_ENABLE_DEBUG_INFO: INCLUDE_SOURCE
release:
SWIFT_COMPILATION_MODE: wholemodule
DEBUG_INFORMATION_FORMAT: "dwarf-with-dsym"
ENABLE_NS_ASSERTIONS: NO
MTL_ENABLE_DEBUG_INFO: NO
packages:
ViewInspector:
url: https://github.com/nalexn/ViewInspector
from: 0.10.0
SwiftLintPlugins:
url: https://github.com/SimplyDanny/SwiftLintPlugins
from: 0.57.1
FluidMenuBarExtra:
# Forked to:
# - Dynamically update the menu bar icon
# - Set onAppear/disappear handlers.
# The upstream repo has a purposefully limited API
url: https://github.com/coder/fluid-menu-bar-extra
revision: 96a861a
KeychainAccess:
url: https://github.com/kishikawakatsumi/KeychainAccess
branch: e0c7eebc5a4465a3c4680764f26b7a61f567cdaf
SwiftProtobuf:
url: https://github.com/apple/swift-protobuf.git
exactVersion: 1.28.2
Mocker:
url: https://github.com/WeTransfer/Mocker
from: 3.0.2
LaunchAtLogin:
url: https://github.com/sindresorhus/LaunchAtLogin-modern
from: 1.1.0
GRPC:
url: https://github.com/grpc/grpc-swift
# v2 does not support macOS 14.0
exactVersion: 1.24.2
Subprocess:
url: https://github.com/jamf/Subprocess
revision: 9d67b79
Semaphore:
url: https://github.com/groue/Semaphore/
exactVersion: 0.1.0
targets:
Coder Desktop:
type: application
platform: macOS
sources:
- path: Coder-Desktop
- path: Resources
buildPhase: resources
entitlements:
path: Coder-Desktop/Coder-Desktop.entitlements
properties:
com.apple.developer.networking.networkextension:
- packet-tunnel-provider${PTP_SUFFIX}
com.apple.developer.system-extension.install: true
com.apple.security.application-groups:
- $(TeamIdentifierPrefix)com.coder.Coder-Desktop
settings:
base:
ASSETCATALOG_COMPILER_APPICON_NAME: AppIcon # Sets the app icon to "AppIcon".
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME: AccentColor
# `CODE_SIGN_*` options are overriden during a release build
CODE_SIGN_IDENTITY: "Apple Development"
CODE_SIGN_STYLE: Automatic
COMBINE_HIDPI_IMAGES: YES
DEVELOPMENT_ASSET_PATHS: '"Coder-Desktop/Preview Content"' # Adds development assets.
ENABLE_HARDENED_RUNTIME: YES
ENABLE_PREVIEWS: YES
INFOPLIST_KEY_LSUIElement: YES
INFOPLIST_KEY_NSHumanReadableCopyright: ""
SWIFT_EMIT_LOC_STRINGS: YES
PRODUCT_BUNDLE_IDENTIFIER: "com.coder.Coder-Desktop"
# Empty outside of release builds
PROVISIONING_PROFILE_SPECIFIER: ${APP_PROVISIONING_PROFILE_ID}
# (ThomasK33): Install the application into the /Applications folder
# so that macOS stops complaining about the app being run from an
# untrusted folder.
DEPLOYMENT_LOCATION: YES
DSTROOT: $(LOCAL_APPS_DIR)/Coder
INSTALL_PATH: /
SKIP_INSTALL: NO
LD_RUNPATH_SEARCH_PATHS:
# Load frameworks from the SE bundle.
- "@executable_path/../../Contents/Library/SystemExtensions/com.coder.Coder-Desktop.VPN.systemextension/Contents/Frameworks"
- "@executable_path/../Frameworks"
- "@loader_path/Frameworks"
dependencies:
- target: CoderSDK
embed: false # Loaded from SE bundle
- target: VPNLib
embed: false # Loaded from SE bundle
- target: VPN
embed: without-signing # Embed without signing.
- package: FluidMenuBarExtra
- package: KeychainAccess
- package: LaunchAtLogin
scheme:
testPlans:
- path: Coder-Desktop.xctestplan
testTargets:
- Coder-DesktopTests
- Coder-DesktopUITests
buildToolPlugins:
- plugin: SwiftLintBuildToolPlugin
package: SwiftLintPlugins
Coder-DesktopTests:
type: bundle.unit-test
platform: macOS
sources:
- path: Coder-DesktopTests
- path: Resources
buildPhase: resources
settings:
base:
BUNDLE_LOADER: "$(TEST_HOST)"
TEST_HOST: "$(BUILT_PRODUCTS_DIR)/Coder Desktop.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/Coder Desktop"
PRODUCT_BUNDLE_IDENTIFIER: "com.coder.Coder-DesktopTests"
dependencies:
- target: "Coder Desktop"
- target: CoderSDK
embed: false # Do not embed the framework.
- package: ViewInspector
- package: Mocker
Coder-DesktopUITests:
type: bundle.ui-testing
platform: macOS
sources:
- path: Coder-DesktopUITests
settings:
base:
PRODUCT_BUNDLE_IDENTIFIER: "com.coder.Coder-DesktopUITests"
dependencies:
- target: Coder Desktop
VPN:
type: system-extension
platform: macOS
sources:
- path: VPN
entitlements:
path: VPN/VPN.entitlements
properties:
com.apple.developer.networking.networkextension:
# PTP_SUFFIX is populated at `xcodegen` time.
- packet-tunnel-provider${PTP_SUFFIX}
com.apple.security.app-sandbox: true
com.apple.security.application-groups:
- $(TeamIdentifierPrefix)com.coder.Coder-Desktop
com.apple.security.network.client: true
com.apple.security.network.server: true
settings:
base:
ENABLE_HARDENED_RUNTIME: YES
INFOPLIST_FILE: VPN/Info.plist
PRODUCT_BUNDLE_IDENTIFIER: "com.coder.Coder-Desktop.VPN"
PRODUCT_MODULE_NAME: "$(PRODUCT_NAME:c99extidentifier)"
PRODUCT_NAME: "$(PRODUCT_BUNDLE_IDENTIFIER)"
SWIFT_EMIT_LOC_STRINGS: YES
SWIFT_OBJC_BRIDGING_HEADER: "VPN/com_coder_Coder_Desktop_VPN-Bridging-Header.h"
# `CODE_SIGN_*` are overriden during a release build
CODE_SIGN_IDENTITY: "Apple Development"
CODE_SIGN_STYLE: Automatic
# Empty outside of release builds
PROVISIONING_PROFILE_SPECIFIER: ${EXT_PROVISIONING_PROFILE_ID}
dependencies:
# The app loads the framework embedded here too
- target: VPNLib
embed: true
# The app loads the framework embedded here too
- target: CoderSDK
embed: true
- sdk: NetworkExtension.framework
VPNLib:
type: framework
platform: macOS
sources:
- path: VPNLib
settings:
base:
PRODUCT_NAME: "$(TARGET_NAME:c99extidentifier)"
SWIFT_EMIT_LOC_STRINGS: YES
PRODUCT_BUNDLE_IDENTIFIER: "com.coder.Coder-Desktop.VPNLib"
DYLIB_COMPATIBILITY_VERSION: 1
DYLIB_CURRENT_VERSION: 1
DYLIB_INSTALL_NAME_BASE: "@rpath"
LD_RUNPATH_SEARCH_PATHS:
- "@executable_path/../Frameworks"
- "@loader_path/Frameworks"
scheme:
testTargets:
- VPNLibTests
dependencies:
- package: SwiftProtobuf
- package: SwiftProtobuf
product: SwiftProtobufPluginLibrary
- package: GRPC
- package: Subprocess
- package: Semaphore
- target: CoderSDK
embed: false
VPNLibTests:
type: bundle.unit-test
platform: macOS
sources:
- path: VPNLibTests
settings:
base:
TEST_HOST: "$(BUILT_PRODUCTS_DIR)/Coder Desktop.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/Coder Desktop"
PRODUCT_BUNDLE_IDENTIFIER: "com.coder.Coder-Desktop.VPNLibTests"
dependencies:
- target: Coder Desktop
- target: VPNLib
embed: false
- package: Mocker
CoderSDK:
type: framework
platform: macOS
sources:
- path: CoderSDK
settings:
base:
INFOPLIST_KEY_NSHumanReadableCopyright: ""
PRODUCT_NAME: "$(TARGET_NAME:c99extidentifier)"
SWIFT_EMIT_LOC_STRINGS: YES
GENERATE_INFOPLIST_FILE: YES
DYLIB_COMPATIBILITY_VERSION: 1
DYLIB_CURRENT_VERSION: 1
DYLIB_INSTALL_NAME_BASE: "@rpath"
scheme:
testTargets:
- CoderSDKTests
dependencies: []
CoderSDKTests:
type: bundle.unit-test
platform: macOS
sources:
- path: CoderSDKTests
dependencies:
- target: "Coder Desktop"
- target: CoderSDK
embed: false # Do not embed the framework.
- package: Mocker
settings:
base:
TEST_HOST: "$(BUILT_PRODUCTS_DIR)/Coder Desktop.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/Coder Desktop"
PRODUCT_BUNDLE_IDENTIFIER: com.coder.Coder-Desktop.CoderSDKTests