diff --git a/.mise.toml b/.mise.toml index 3d5e34f36..b5f5d5745 100644 --- a/.mise.toml +++ b/.mise.toml @@ -1,5 +1,5 @@ [tools] -tuist = '4.28.1' +tuist = '4.29.0' periphery = '2.21.1' swiftformat = '0.54.5' swiftlint = '0.57.0' diff --git a/Project.swift b/Project.swift index 4d06ba6f7..fd5ac3eab 100644 --- a/Project.swift +++ b/Project.swift @@ -20,6 +20,46 @@ import Foundation import ProjectDescription import ProjectDescriptionHelpers +let sharedCoreUIDependencies: [TargetDependency] = [ + .external(name: "SwiftUIIntrospect-Static"), + .external(name: "InfomaniakOnboarding"), + .external(name: "Shimmer"), + .external(name: "WrappingHStack"), + .external(name: "NavigationBackport"), + .external(name: "Popovers"), + .external(name: "SwiftUIBackports") +] + +let sharedCoreDependencies: [TargetDependency] = [ + .target(name: "MailResources"), + .external(name: "Algorithms"), + .external(name: "Alamofire"), + .external(name: "Atlantis"), + .external(name: "InfomaniakCore"), + .external(name: "InfomaniakCoreDB"), + .external(name: "InfomaniakCoreCommonUI"), + .external(name: "InfomaniakCoreSwiftUI"), + .external(name: "InfomaniakCoreUIKit"), + .external(name: "InfomaniakLogin"), + .external(name: "InfomaniakDI"), + .external(name: "InfomaniakConcurrency"), + .external(name: "InfomaniakNotifications"), + .external(name: "InfomaniakBugTracker"), + .external(name: "InfomaniakCreateAccount"), + .external(name: "RealmSwift"), + .external(name: "Realm"), + .external(name: "SwiftRegex"), + .external(name: "Nuke"), + .external(name: "NukeUI"), + .external(name: "SwiftSoup"), + .external(name: "Swifter"), + .external(name: "VersionChecker"), + .external(name: "SwiftModalPresentation"), + .external(name: "SVGKit"), + .external(name: "SnackBar"), + .external(name: "InfomaniakRichHTMLEditor") +] + let project = Project(name: "Mail", options: .options( automaticSchemesOptions: .enabled( @@ -46,15 +86,13 @@ let project = Project(name: "Mail", Constants.stripSymbolsScript ], dependencies: [ - .target(name: "MailResources"), .target(name: "MailCore"), .target(name: "MailCoreUI"), .target(name: "MailNotificationServiceExtension"), .target(name: "MailNotificationContentExtension"), .target(name: "MailShareExtension"), .target(name: "MailAppIntentsExtension"), - .external(name: "Realm") - ], + ] + sharedCoreDependencies + sharedCoreUIDependencies, settings: .settings(base: Constants.baseSettings), environmentVariables: [ "hostname": .environmentVariable(value: "\(ProcessInfo.processInfo.hostName).", @@ -69,10 +107,8 @@ let project = Project(name: "Mail", sources: "MailTests/**", dependencies: [ .target(name: "Infomaniak Mail"), - .target(name: "MailResources"), - .target(name: "MailCore"), - .external(name: "RealmSwift"), - ], + .target(name: "MailCore") + ] + sharedCoreDependencies, settings: .settings(base: Constants.testSettings)), .target(name: "MailUITests", destinations: Constants.destinations, @@ -83,10 +119,8 @@ let project = Project(name: "Mail", sources: "MailUITests/**", dependencies: [ .target(name: "Infomaniak Mail"), - .target(name: "MailResources"), - .target(name: "MailCore"), - .external(name: "Realm") - ], + .target(name: "MailCore") + ] + sharedCoreDependencies, settings: .settings(base: Constants.testSettings)), .target(name: "MailShareExtension", destinations: Constants.destinations, @@ -107,11 +141,9 @@ let project = Project(name: "Mail", entitlements: "MailShareExtension/ShareExtension.entitlements", scripts: [Constants.swiftlintScript], dependencies: [ - .target(name: "MailResources"), .target(name: "MailCore"), .target(name: "MailCoreUI"), - .external(name: "Realm") - ], + ] + sharedCoreDependencies + sharedCoreUIDependencies, settings: .settings(base: Constants.baseSettings)), .target(name: "MailNotificationServiceExtension", destinations: Constants.destinations, @@ -130,11 +162,7 @@ let project = Project(name: "Mail", ]), sources: "MailNotificationServiceExtension/**", entitlements: "MailResources/Mail.entitlements", - dependencies: [ - .target(name: "MailResources"), - .target(name: "MailCore"), - .external(name: "Realm") - ], + dependencies: [.target(name: "MailCore")] + sharedCoreDependencies, settings: .settings(base: Constants.baseSettings)), .target(name: "MailNotificationContentExtension", destinations: Constants.destinations, @@ -152,13 +180,11 @@ let project = Project(name: "Mail", entitlements: "MailNotificationContentExtension/MailNotificationContentExtension.entitlements", scripts: [Constants.swiftlintScript], dependencies: [ - .target(name: "MailResources"), .target(name: "MailCore"), .target(name: "MailCoreUI"), - .external(name: "Realm"), .sdk(name: "UserNotifications", type: .framework), .sdk(name: "UserNotificationsUI", type: .framework) - ], + ] + sharedCoreDependencies + sharedCoreUIDependencies, settings: .settings(base: Constants.baseSettings)), .target(name: "MailAppIntentsExtension", destinations: Constants.destinations, @@ -180,10 +206,7 @@ let project = Project(name: "Mail", "MailResources/**/*.stringsdict" ], entitlements: "MailResources/Mail.entitlements", - dependencies: [ - .target(name: "MailCore"), - .external(name: "RealmSwift"), - ], + dependencies: [.target(name: "MailCore")] + sharedCoreDependencies, settings: .settings(base: Constants.baseSettings)), .target(name: "MailResources", destinations: Constants.destinations, @@ -208,35 +231,9 @@ let project = Project(name: "Mail", deploymentTargets: Constants.deploymentTarget, infoPlist: "MailCore/Info.plist", sources: "MailCore/**", - dependencies: [ - .target(name: "MailResources"), - .external(name: "Algorithms"), - .external(name: "Alamofire"), - .external(name: "Atlantis"), - .external(name: "InfomaniakCore"), - .external(name: "InfomaniakCoreDB"), - .external(name: "InfomaniakCoreCommonUI"), - .external(name: "InfomaniakCoreSwiftUI"), - .external(name: "InfomaniakCoreUIKit"), - .external(name: "InfomaniakLogin"), - .external(name: "InfomaniakDI"), - .external(name: "InfomaniakConcurrency"), - .external(name: "InfomaniakNotifications"), - .external(name: "InfomaniakBugTracker"), - .external(name: "InfomaniakCreateAccount"), - .external(name: "RealmSwift"), - .external(name: "Realm"), - .external(name: "SwiftRegex"), - .external(name: "Nuke"), - .external(name: "NukeUI"), - .external(name: "SwiftSoup"), - .external(name: "Swifter"), - .external(name: "VersionChecker"), - .external(name: "SwiftModalPresentation"), - .external(name: "SVGKit"), - .external(name: "InfomaniakRichHTMLEditor") - ], - settings: .settings(base: Constants.baseSettings)), + dependencies: sharedCoreDependencies, + settings: .settings(base: + Constants.baseSettings.merging(["OTHER_LDFLAGS": "$(inherited) -ObjC"]))), .target(name: "MailCoreUI", destinations: Constants.destinations, product: .framework, @@ -244,17 +241,7 @@ let project = Project(name: "Mail", deploymentTargets: Constants.deploymentTarget, infoPlist: "MailCoreUI/Info.plist", sources: "MailCoreUI/**", - dependencies: [ - .target(name: "MailResources"), - .target(name: "MailCore"), - .external(name: "SwiftUIIntrospect-Static"), - .external(name: "InfomaniakOnboarding"), - .external(name: "Shimmer"), - .external(name: "WrappingHStack"), - .external(name: "NavigationBackport"), - .external(name: "Popovers"), - .external(name: "SwiftUIBackports") - ], + dependencies: [.target(name: "MailCore")] + sharedCoreDependencies + sharedCoreUIDependencies, settings: .settings(base: Constants.baseSettings)) ], schemes: [ diff --git a/Tuist/Package.resolved b/Tuist/Package.resolved index adc35b924..e6799a163 100644 --- a/Tuist/Package.resolved +++ b/Tuist/Package.resolved @@ -32,8 +32,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/Infomaniak/ios-bug-tracker", "state" : { - "revision" : "02275afb3808ff01f1047bf0215326601ce177c3", - "version" : "7.0.0" + "branch" : "remove-cocoalumberjack", + "revision" : "9618c3b593a852ef8a56d14087056b4b9927e8f1" } }, { @@ -41,8 +41,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/Infomaniak/ios-core", "state" : { - "revision" : "3275b3dafa41d3bf8e618b715dfac17e236f86b0", - "version" : "12.2.0" + "branch" : "transitive-dependency", + "revision" : "9df81323b8ab150702b59d9ee80fe7fdf37ef30b" } }, { diff --git a/Tuist/Package.swift b/Tuist/Package.swift index 3006b29ea..f8c68db55 100644 --- a/Tuist/Package.swift +++ b/Tuist/Package.swift @@ -7,8 +7,41 @@ import ProjectDescriptionHelpers let packageSettings = PackageSettings( productTypes: [ + "Algorithms": .framework, + "Alamofire": .framework, + "Atlantis": .framework, + "InfomaniakCore": .framework, + "InfomaniakCoreDB": .framework, + "InfomaniakCoreCommonUI": .framework, + "InfomaniakCoreSwiftUI": .framework, + "InfomaniakCoreUIKit": .framework, + "InfomaniakLogin": .framework, + "InfomaniakDI": .framework, + "InfomaniakConcurrency": .framework, + "InfomaniakNotifications": .framework, + "InfomaniakBugTracker": .framework, + "InfomaniakCreateAccount": .framework, + "CocoaLumberjackSwift": .framework, + "CocoaLumberjack": .framework, + "RealmSwift": .framework, + "Realm": .framework, + "SwiftRegex": .framework, "Nuke": .framework, - "InfomaniakDI": .framework + "NukeUI": .framework, + "SwiftSoup": .framework, + "Swifter": .framework, + "VersionChecker": .framework, + "SwiftModalPresentation": .framework, + "SVGKit": .framework, + "SnackBar": .framework, + "InfomaniakRichHTMLEditor": .framework, + "SwiftUIIntrospect": .framework, + "InfomaniakOnboarding": .framework, + "Shimmer": .framework, + "WrappingHStack": .framework, + "NavigationBackport": .framework, + "Popovers": .framework, + "SwiftUIBackports": .framework ] ) @@ -21,18 +54,17 @@ let package = Package( .package(url: "https://github.com/Infomaniak/ios-login", .upToNextMajor(from: "7.0.1")), .package(url: "https://github.com/Infomaniak/ios-dependency-injection", .upToNextMajor(from: "2.0.0")), .package(url: "https://github.com/Infomaniak/swift-concurrency", .upToNextMajor(from: "0.0.5")), - .package(url: "https://github.com/Infomaniak/ios-core", .upToNextMajor(from: "12.2.0")), + .package(url: "https://github.com/Infomaniak/ios-core", branch: "transitive-dependency"), .package(url: "https://github.com/Infomaniak/ios-core-ui", .upToNextMajor(from: "13.1.0")), .package(url: "https://github.com/Infomaniak/ios-notifications", .upToNextMajor(from: "8.0.0")), .package(url: "https://github.com/Infomaniak/ios-create-account", .upToNextMajor(from: "12.0.0")), - .package(url: "https://github.com/Infomaniak/ios-bug-tracker", .upToNextMajor(from: "7.0.0")), + .package(url: "https://github.com/Infomaniak/ios-bug-tracker", branch: "remove-cocoalumberjack"), .package(url: "https://github.com/Infomaniak/ios-version-checker", .upToNextMajor(from: "7.0.0")), .package(url: "https://github.com/Infomaniak/ios-onboarding", .upToNextMajor(from: "1.0.3")), .package(url: "https://github.com/Infomaniak/swift-modal-presentation", .upToNextMajor(from: "1.0.0")), .package(url: "https://github.com/Infomaniak/SwiftSoup", .upToNextMajor(from: "1.1.0")), .package(url: "https://github.com/ProxymanApp/atlantis", .upToNextMajor(from: "1.21.0")), .package(url: "https://github.com/Alamofire/Alamofire", .upToNextMajor(from: "5.2.2")), - .package(url: "https://github.com/CocoaLumberjack/CocoaLumberjack", .upToNextMajor(from: "3.7.0")), .package(url: "https://github.com/realm/realm-swift", .upToNextMajor(from: "10.41.0")), .package(url: "https://github.com/flowbe/SwiftRegex", .upToNextMajor(from: "1.0.0")), .package(url: "https://github.com/matomo-org/matomo-sdk-ios", .upToNextMajor(from: "7.5.1")),