Skip to content

Commit 5ed3893

Browse files
committed
extract to seperate lib
1 parent ebcadbe commit 5ed3893

File tree

7 files changed

+33
-7
lines changed

7 files changed

+33
-7
lines changed

Coder Desktop/Coder Desktop/Coder_DesktopApp.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import FluidMenuBarExtra
22
import NetworkExtension
33
import SwiftUI
4-
import VPNLib
4+
import FSLib
55

66
@main
77
struct DesktopApp: App {

Coder Desktop/VPNLib/FileSync/daemon.grpc.swift renamed to Coder Desktop/FSLib/daemon.grpc.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
// swift-format-ignore-file
44
//
55
// Generated by the protocol buffer compiler.
6-
// Source: Coder Desktop/VPNLib/FileSync/daemon.proto
6+
// Source: Coder Desktop/FSLib/daemon.proto
77
//
88
import GRPC
99
import NIO

Coder Desktop/VPNLib/FileSync/daemon.pb.swift renamed to Coder Desktop/FSLib/daemon.pb.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
// swiftlint:disable all
44
//
55
// Generated by the Swift generator plugin for the protocol buffer compiler.
6-
// Source: Coder Desktop/VPNLib/FileSync/daemon.proto
6+
// Source: Coder Desktop/FSLib/daemon.proto
77
//
88
// For information on using the generated types, please see the documentation:
99
// https://github.com/apple/swift-protobuf/

Coder Desktop/project.yml

+27-1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@ options:
55
macOS: "14.0"
66
xcodeVersion: "1600"
77
minimumXcodeGenVersion: "2.42.0"
8+
# Excldue `.proto` files from all build phases
9+
fileTypes:
10+
proto:
11+
buildPhase: none
812

913
settings:
1014
base:
@@ -156,6 +160,8 @@ targets:
156160
embed: true
157161
- target: VPNLib
158162
embed: true
163+
- target: FSLib
164+
embed: true
159165
- target: VPN
160166
embed: without-signing # Embed without signing.
161167
- package: FluidMenuBarExtra
@@ -259,7 +265,6 @@ targets:
259265
- package: SwiftProtobuf
260266
- package: SwiftProtobuf
261267
product: SwiftProtobufPluginLibrary
262-
- package: GRPC
263268
- target: CoderSDK
264269
embed: false
265270

@@ -278,6 +283,27 @@ targets:
278283
embed: false
279284
- package: Mocker
280285

286+
287+
FSLib:
288+
type: framework
289+
platform: macOS
290+
sources:
291+
- path: FSLib
292+
settings:
293+
base:
294+
INFOPLIST_KEY_NSHumanReadableCopyright: ""
295+
PRODUCT_NAME: "$(TARGET_NAME:c99extidentifier)"
296+
SWIFT_EMIT_LOC_STRINGS: YES
297+
GENERATE_INFOPLIST_FILE: YES
298+
DYLIB_COMPATIBILITY_VERSION: 1
299+
DYLIB_CURRENT_VERSION: 1
300+
DYLIB_INSTALL_NAME_BASE: "@rpath"
301+
dependencies:
302+
- package: SwiftProtobuf
303+
- package: SwiftProtobuf
304+
product: SwiftProtobufPluginLibrary
305+
- package: GRPC
306+
281307
CoderSDK:
282308
type: framework
283309
platform: macOS

Makefile

+3-3
Original file line numberDiff line numberDiff line change
@@ -48,11 +48,11 @@ $(XCPROJECT): $(PROJECT)/project.yml
4848
$(PROJECT)/VPNLib/vpn.pb.swift: $(PROJECT)/VPNLib/vpn.proto
4949
protoc --swift_opt=Visibility=public --swift_out=. 'Coder Desktop/VPNLib/vpn.proto'
5050

51-
$(PROJECT)/VPNLib/FileSync/daemon.pb.swift: $(PROJECT)/VPNLib/FileSync/daemon.proto
51+
$(PROJECT)/FSLib/daemon.pb.swift: $(PROJECT)/FSLib/daemon.proto
5252
protoc \
5353
--swift_out=.\
5454
--grpc-swift_out=. \
55-
'Coder Desktop/VPNLib/FileSync/daemon.proto'
55+
'Coder Desktop/FSLib/daemon.proto'
5656

5757
$(KEYCHAIN_FILE):
5858
security create-keychain -p "" "$(APP_SIGNING_KEYCHAIN)"
@@ -136,7 +136,7 @@ clean/build:
136136
rm -rf build/ release/ $$out
137137

138138
.PHONY: proto
139-
proto: $(PROJECT)/VPNLib/vpn.pb.swift $(PROJECT)/VPNLib/FileSync/daemon.pb.swift ## Generate Swift files from protobufs
139+
proto: $(PROJECT)/VPNLib/vpn.pb.swift $(PROJECT)/FSLib/daemon.pb.swift ## Generate Swift files from protobufs
140140

141141
.PHONY: help
142142
help: ## Show this help

0 commit comments

Comments
 (0)