-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathProject.swift
More file actions
143 lines (130 loc) · 5.77 KB
/
Project.swift
File metadata and controls
143 lines (130 loc) · 5.77 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
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
import ProjectDescription
public struct Envs {
public static let marketingVersion: String = "7.0.1"
public static let currentProjectVersion: String = "15"
public static let organizationName = "synctionlabs"
public static let appIdentifier = "synction"
public static let urlScheme = "synction"
public static let devTeam = "72HKNKHJ2L"
public static let appName = "Formidable"
public static let notionPrivateSecret: EnvironmentVariable = "$NOTION_PRIVATE_SECRET"
public static let todoistPrivateSecret: EnvironmentVariable = "$TODOIST_PRIVATE_SECRET"
public static let todoistClientId: EnvironmentVariable = "$TODOIST_CLIENT_ID"
public static let notionClientId: EnvironmentVariable = "$NOTION_CLIENT_ID"
public static let revenuecatApiKey: EnvironmentVariable = "$REVENUE_CAT_ID"
public static var bundleId: String {
"com.\(Envs.organizationName).\(Envs.appIdentifier)"
}
}
public extension [String : ProjectDescription.EnvironmentVariable] {
static let envs: [String : ProjectDescription.EnvironmentVariable] = [
"NOTION_PRIVATE_SECRET": Envs.notionPrivateSecret,
"TODOIST_PRIVATE_SECRET": Envs.todoistPrivateSecret,
"IS_FIRST_LAUNCH": "false"
].merging(.envsRelease) { (_, new) in new }
static let envsRelease: [String : ProjectDescription.EnvironmentVariable] = [
"TODOIST_CLIENT_ID": Envs.todoistClientId,
"NOTION_CLIENT_ID": Envs.notionClientId,
"REVENUECAT_API_KEY": Envs.revenuecatApiKey,
]
}
extension ProjectDescription.InfoPlist {
static let infoPlist: ProjectDescription.InfoPlist = .file(path: "Formidable-Info.plist")
}
let settings: SettingsDictionary = [
"DEVELOPMENT_TEAM": "72HKNKHJ2L",
"MACOSX_DEPLOYMENT_TARGET": "14.0",
"ENABLE_USER_SCRIPT_SANDBOXING": true,
"ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS": true,
"INFOPLIST_KEY_LSApplicationCategoryType": "public.app-category.productivity",
"INFOPLIST_KEY_CFBundleDisplayName": .string(Envs.appName)
]
.appleGenericVersioningSystem()
.automaticCodeSigning(devTeam: Envs.devTeam)
.codeSignIdentityAppleDevelopment()
let project = Project(
name: "Formidable",
packages: .packages,
targets: [
.target(
name: "Formidable",
destinations: [.mac, .iPhone, .iPad],
product: .app,
bundleId: Envs.bundleId,
deploymentTargets: .multiplatform(iOS: "17.0", macOS: "14.0"),
infoPlist: .infoPlist,
sources: ["Formidable/Sources/**"],
resources: ["Formidable/Resources/**"],
entitlements: .file(path: "Formidable/Formidable.entitlements"),
dependencies: .dependencies,
settings: .settings(configurations: [
.debug(name: "Debug", settings: settings, xcconfig: "Release.xcconfig"),
.release(name: "Release", settings: settings),
])
),
.target(
name: "FormidableTests",
destinations: .macOS,
product: .unitTests,
bundleId: "\(Envs.bundleId)Tests",
infoPlist: .default,
sources: ["Formidable/Tests/**"],
resources: [],
dependencies: [.target(name: "Formidable")]
),
],
schemes: [
.scheme(
name: "Formidable",
shared: true,
buildAction: .buildAction(targets: ["Formidable"]),
testAction: .targets(["FormidableTests"]),
runAction: .runAction(
configuration: "Debug",
executable: "Formidable",
arguments: .arguments(
environmentVariables: .envs
)
)
)
]
)
public extension Package {
static func package(_ name: String) -> ProjectDescription.Package {
Package.package(path: "Packages/\(name)")
}
}
public extension ProjectDescription.Package {
static let todoistIntegration = Package.package(url: "https://github.com/Fiser12/SyncTionTodoist", .exact("0.1.2"))
static let notionIntegration = Package.package(url: "https://github.com/Fiser12/SyncTionNotion", .exact("0.1.3"))
static let formidableCore = Package.package(url: "https://github.com/Fiser12/SyncTionCore", .exact("0.1.4"))
static let remindersIntegration = Package.package(url: "https://github.com/Fiser12/SyncTionReminders", .exact("0.1.0"))
static let calendarsIntegration = Package.package(url: "https://github.com/Fiser12/SyncTionCalendars", .exact("0.1.0"))
static let revenueCat = Package.package(url: "https://github.com/RevenueCat/purchases-ios", .exact("4.39.1"))
static let preludePackage = Package.package(url: "https://github.com/Fiser12/PreludePackage", .exact("0.0.5"))
static let navigationPackage = Package.package(url: "https://github.com/pointfreeco/swiftui-navigation", .exact("1.3.0"))
}
public extension [ProjectDescription.Package] {
static let packages: [ProjectDescription.Package] = [
.revenueCat,
.preludePackage,
.formidableCore,
.calendarsIntegration,
.remindersIntegration,
.notionIntegration,
.todoistIntegration,
.navigationPackage
]
}
public extension [ProjectDescription.TargetDependency] {
static let dependencies: [ProjectDescription.TargetDependency] = [
.package(product: "PreludePackage", type: .runtime),
.package(product: "SwiftUINavigation", type: .runtime),
.package(product: "RevenueCat", type: .runtime),
.package(product: "SyncTionCore", type: .runtime),
.package(product: "SyncTionCalendars", type: .runtime),
.package(product: "SyncTionNotion", type: .runtime),
.package(product: "SyncTionReminders", type: .runtime),
.package(product: "SyncTionTodoist", type: .runtime)
]
}