Skip to content

Commit

Permalink
chore: Implicit dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
PhilippeWeidmann committed Oct 4, 2024
1 parent 65205d6 commit fb91893
Show file tree
Hide file tree
Showing 3 changed files with 90 additions and 75 deletions.
118 changes: 51 additions & 67 deletions Project.swift
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,45 @@ 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: "InfomaniakRichHTMLEditor")
]

let project = Project(name: "Mail",
options: .options(
automaticSchemesOptions: .enabled(
Expand All @@ -46,15 +85,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,
settings: .settings(base: Constants.baseSettings),
environmentVariables: [
"hostname": .environmentVariable(value: "\(ProcessInfo.processInfo.hostName).",
Expand All @@ -69,10 +106,7 @@ let project = Project(name: "Mail",
sources: "MailTests/**",
dependencies: [
.target(name: "Infomaniak Mail"),
.target(name: "MailResources"),
.target(name: "MailCore"),
.external(name: "RealmSwift"),
],
] + sharedCoreDependencies,
settings: .settings(base: Constants.testSettings)),
.target(name: "MailUITests",
destinations: Constants.destinations,
Expand All @@ -82,11 +116,8 @@ let project = Project(name: "Mail",
infoPlist: .default,
sources: "MailUITests/**",
dependencies: [
.target(name: "Infomaniak Mail"),
.target(name: "MailResources"),
.target(name: "MailCore"),
.external(name: "Realm")
],
.target(name: "Infomaniak Mail")
] + sharedCoreDependencies,
settings: .settings(base: Constants.testSettings)),
.target(name: "MailShareExtension",
destinations: Constants.destinations,
Expand All @@ -107,11 +138,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,
Expand All @@ -130,11 +159,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,
Expand All @@ -152,13 +177,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,
Expand All @@ -180,10 +203,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,
Expand All @@ -208,53 +228,17 @@ 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,
bundleId: "com.infomaniak.mail.coreui",
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: [
Expand Down
8 changes: 4 additions & 4 deletions Tuist/Package.resolved
Original file line number Diff line number Diff line change
Expand Up @@ -32,17 +32,17 @@
"kind" : "remoteSourceControl",
"location" : "https://github.com/Infomaniak/ios-bug-tracker",
"state" : {
"revision" : "02275afb3808ff01f1047bf0215326601ce177c3",
"version" : "7.0.0"
"branch" : "remove-cocoalumberjack",
"revision" : "9618c3b593a852ef8a56d14087056b4b9927e8f1"
}
},
{
"identity" : "ios-core",
"kind" : "remoteSourceControl",
"location" : "https://github.com/Infomaniak/ios-core",
"state" : {
"revision" : "3275b3dafa41d3bf8e618b715dfac17e236f86b0",
"version" : "12.2.0"
"branch" : "transitive-dependency",
"revision" : "9df81323b8ab150702b59d9ee80fe7fdf37ef30b"
}
},
{
Expand Down
39 changes: 35 additions & 4 deletions Tuist/Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,40 @@ 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,
"InfomaniakRichHTMLEditor": .framework,
"SwiftUIIntrospect": .framework,
"InfomaniakOnboarding": .framework,
"Shimmer": .framework,
"WrappingHStack": .framework,
"NavigationBackport": .framework,
"Popovers": .framework,
"SwiftUIBackports": .framework
]
)

Expand All @@ -21,18 +53,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")),
Expand Down

0 comments on commit fb91893

Please sign in to comment.