mirror of https://github.com/buresdv/Cork
parent
6d0334ce7f
commit
573daf9930
|
|
@ -11,6 +11,21 @@ import CorkShared
|
|||
import Foundation
|
||||
import Observation
|
||||
@preconcurrency import UserNotifications
|
||||
import FactoryKit
|
||||
|
||||
extension Container
|
||||
{
|
||||
@MainActor
|
||||
var appState: Factory<AppState>
|
||||
{
|
||||
self {
|
||||
MainActor.assumeIsolated
|
||||
{
|
||||
AppState()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// Class that holds the global state of the app, excluding services
|
||||
@Observable @MainActor
|
||||
|
|
|
|||
|
|
@ -15,6 +15,7 @@ import Defaults
|
|||
import SwiftData
|
||||
import SwiftUI
|
||||
import UserNotifications
|
||||
import FactoryKit
|
||||
|
||||
// swiftlint:disable type_body_length
|
||||
@main
|
||||
|
|
@ -22,6 +23,8 @@ struct CorkApp: App
|
|||
{
|
||||
@NSApplicationDelegateAdaptor(AppDelegate.self) var appDelegate: AppDelegate
|
||||
|
||||
@Injected(\.appConstants) private var appConstants: AppConstants
|
||||
|
||||
@State var brewPackagesTracker: BrewPackagesTracker = .init()
|
||||
@State var tapTracker: TapTracker = .init()
|
||||
|
||||
|
|
|
|||
|
|
@ -35,6 +35,7 @@ func corkTarget(configureWithSelfCompiled: Bool) -> ProjectDescription.Target {
|
|||
.external(name: "LaunchAtLogin"),
|
||||
.external(name: "DavidFoundation"),
|
||||
.external(name: "ButtonKit"),
|
||||
.external(name: "FactoryKit"),
|
||||
.package(product: "SwiftLintBuildToolPlugin", type: .plugin),
|
||||
.external(name: "Defaults"),
|
||||
.external(name: "DefaultsMacros")
|
||||
|
|
@ -63,7 +64,8 @@ let corkSharedTarget: ProjectDescription.Target = .target(
|
|||
"Modules/Shared/**/*.swift"
|
||||
],
|
||||
dependencies: [
|
||||
.external(name: "Defaults")
|
||||
.external(name: "Defaults"),
|
||||
.external(name: "FactoryKit")
|
||||
],
|
||||
settings: .settings(configurations: [
|
||||
.debug(
|
||||
|
|
|
|||
|
|
@ -27,6 +27,15 @@
|
|||
"version" : "9.0.2"
|
||||
}
|
||||
},
|
||||
{
|
||||
"identity" : "factory",
|
||||
"kind" : "remoteSourceControl",
|
||||
"location" : "https://github.com/hmlongco/Factory",
|
||||
"state" : {
|
||||
"revision" : "ccc898f21992ebc130bc04cc197460a5ae230bcf",
|
||||
"version" : "2.5.3"
|
||||
}
|
||||
},
|
||||
{
|
||||
"identity" : "launchatlogin-modern",
|
||||
"kind" : "remoteSourceControl",
|
||||
|
|
|
|||
|
|
@ -24,6 +24,7 @@ let package = Package(
|
|||
// You can read more about dependencies here: https://docs.tuist.io/documentation/tuist/dependencies
|
||||
.package(url: "https://github.com/sindresorhus/LaunchAtLogin-Modern", .upToNextMajor(from: "1.0.0")),
|
||||
.package(url: "https://github.com/sindresorhus/Defaults", .upToNextMajor(from: "9.0.2")),
|
||||
.package(url: "https://github.com/hmlongco/Factory", .upToNextMajor(from: .init(2, 5, 3))),
|
||||
.package(url: "https://github.com/buresdv/DavidFoundation", .upToNextMajor(from: "2.0.1")),
|
||||
.package(url: "https://github.com/Dean151/ButtonKit", .upToNextMajor(from: "0.6.1")),
|
||||
.package(url: "https://github.com/SimplyDanny/SwiftLintPlugins", .upToNextMajor(from: "0.56.1")),
|
||||
|
|
|
|||
Loading…
Reference in New Issue