diff --git a/.mise.toml b/.mise.toml index 0df62c38..ee27ddd9 100644 --- a/.mise.toml +++ b/.mise.toml @@ -1,2 +1,2 @@ [tools] -tuist = "4.25.0" +tuist = "4.50.2" diff --git a/Derived/InfoPlists/CorkHelp-Info.plist b/Derived/InfoPlists/CorkHelp-Info.plist index f1d34193..7a90fce0 100644 --- a/Derived/InfoPlists/CorkHelp-Info.plist +++ b/Derived/InfoPlists/CorkHelp-Info.plist @@ -4,8 +4,6 @@ CFBundleDevelopmentRegion $(DEVELOPMENT_LANGUAGE) - CFBundleExecutable - $(EXECUTABLE_NAME) CFBundleIdentifier $(PRODUCT_BUNDLE_IDENTIFIER) CFBundleInfoDictionaryVersion diff --git a/Derived/Sources/TuistAssets+Cork.swift b/Derived/Sources/TuistAssets+Cork.swift index bc9a989e..b7177fff 100644 --- a/Derived/Sources/TuistAssets+Cork.swift +++ b/Derived/Sources/TuistAssets+Cork.swift @@ -1,3 +1,4 @@ +// swiftlint:disable:this file_name // swiftlint:disable all // swift-format-ignore-file // swiftformat:disable all @@ -14,11 +15,8 @@ import SwiftUI #endif -// swiftlint:disable superfluous_disable_command file_length implicit_return - // MARK: - Asset Catalogs -// swiftlint:disable identifier_name line_length nesting type_body_length type_name public enum CorkAsset: Sendable { public enum Assets { public static let accentColor = CorkColors(name: "AccentColor") @@ -38,7 +36,6 @@ public enum CorkAsset: Sendable { public enum PreviewAssets { } } -// swiftlint:enable identifier_name line_length nesting type_body_length type_name // MARK: - Implementation Details @@ -147,5 +144,5 @@ public extension SwiftUI.Image { } #endif -// swiftlint:enable all // swiftformat:enable all +// swiftlint:enable all diff --git a/Derived/Sources/TuistAssets+SelfCompiled.swift b/Derived/Sources/TuistAssets+SelfCompiled.swift index bc9a989e..b7177fff 100644 --- a/Derived/Sources/TuistAssets+SelfCompiled.swift +++ b/Derived/Sources/TuistAssets+SelfCompiled.swift @@ -1,3 +1,4 @@ +// swiftlint:disable:this file_name // swiftlint:disable all // swift-format-ignore-file // swiftformat:disable all @@ -14,11 +15,8 @@ import SwiftUI #endif -// swiftlint:disable superfluous_disable_command file_length implicit_return - // MARK: - Asset Catalogs -// swiftlint:disable identifier_name line_length nesting type_body_length type_name public enum CorkAsset: Sendable { public enum Assets { public static let accentColor = CorkColors(name: "AccentColor") @@ -38,7 +36,6 @@ public enum CorkAsset: Sendable { public enum PreviewAssets { } } -// swiftlint:enable identifier_name line_length nesting type_body_length type_name // MARK: - Implementation Details @@ -147,5 +144,5 @@ public extension SwiftUI.Image { } #endif -// swiftlint:enable all // swiftformat:enable all +// swiftlint:enable all diff --git a/Derived/Sources/TuistBundle+Cork.swift b/Derived/Sources/TuistBundle+Cork.swift index 30ee2962..d164c33c 100644 --- a/Derived/Sources/TuistBundle+Cork.swift +++ b/Derived/Sources/TuistBundle+Cork.swift @@ -1,16 +1,25 @@ +// periphery:ignore:all +// swiftlint:disable:this file_name // swiftlint:disable all // swift-format-ignore-file // swiftformat:disable all -import Foundation// MARK: - Swift Bundle Accessor for Frameworks +#if hasFeature(InternalImportsByDefault) +public import Foundation +#else +import Foundation +#endif +// MARK: - Swift Bundle Accessor for Frameworks private class BundleFinder {} extension Foundation.Bundle { /// Since Cork is a application, the bundle for classes within this module can be used directly. -static let module = Bundle(for: BundleFinder.self) -}// MARK: - Objective-C Bundle Accessor + static let module = Bundle(for: BundleFinder.self) +} +// MARK: - Objective-C Bundle Accessor @objc public class CorkResources: NSObject { @objc public class var bundle: Bundle { return .module } -}// swiftlint:enable all -// swiftformat:enable all \ No newline at end of file +} +// swiftformat:enable all +// swiftlint:enable all \ No newline at end of file diff --git a/Derived/Sources/TuistBundle+SelfCompiled.swift b/Derived/Sources/TuistBundle+SelfCompiled.swift index ac8cabbf..acbb7328 100644 --- a/Derived/Sources/TuistBundle+SelfCompiled.swift +++ b/Derived/Sources/TuistBundle+SelfCompiled.swift @@ -1,16 +1,25 @@ +// periphery:ignore:all +// swiftlint:disable:this file_name // swiftlint:disable all // swift-format-ignore-file // swiftformat:disable all -import Foundation// MARK: - Swift Bundle Accessor for Frameworks +#if hasFeature(InternalImportsByDefault) +public import Foundation +#else +import Foundation +#endif +// MARK: - Swift Bundle Accessor for Frameworks private class BundleFinder {} extension Foundation.Bundle { /// Since Self-Compiled is a application, the bundle for classes within this module can be used directly. -static let module = Bundle(for: BundleFinder.self) -}// MARK: - Objective-C Bundle Accessor + static let module = Bundle(for: BundleFinder.self) +} +// MARK: - Objective-C Bundle Accessor @objc public class CorkResources: NSObject { @objc public class var bundle: Bundle { return .module } -}// swiftlint:enable all -// swiftformat:enable all \ No newline at end of file +} +// swiftformat:enable all +// swiftlint:enable all \ No newline at end of file diff --git a/Project.swift b/Project.swift index ab69eb29..d2b88bd2 100644 --- a/Project.swift +++ b/Project.swift @@ -50,6 +50,85 @@ func corkTarget(configureWithSelfCompiled: Bool) -> ProjectDescription.Target { ) } +let corkSharedTarget: ProjectDescription.Target = .target( + name: "CorkShared", + destinations: [.mac], + product: .staticLibrary, + bundleId: "eu.davidbures.cork-shared", + deploymentTargets: .macOS("14.0.0"), + sources: [ + "Modules/Shared/**/*.swift" + ], + dependencies: [ + .external(name: "Defaults") + ], + settings: .settings(configurations: [ + .debug( + name: "Debug", + xcconfig: .relativeToRoot("xcconfigs/Cork.xcconfig") + ), + .release( + name: "Release", + xcconfig: .relativeToRoot("xcconfigs/Cork.xcconfig") + ) + ]) +) + +let corkNotificationsTarget: ProjectDescription.Target = .target( + name: "CorkNotifications", + destinations: [.mac], + product: .staticLibrary, + bundleId: "eu.davidbures.cork-notifications", + deploymentTargets: .macOS("14.0.0"), + sources: [ + "Modules/Notifications/**/*.swift" + ], + dependencies: [ + .target(name: "CorkShared") + ], + settings: .settings(configurations: [ + .debug( + name: "Debug", + xcconfig: .relativeToRoot("xcconfigs/Cork.xcconfig") + ), + .release( + name: "Release", + xcconfig: .relativeToRoot("xcconfigs/Cork.xcconfig") + ) + ]) +) + +let corkHelpTarget: ProjectDescription.Target = .target( + name: "CorkHelp", + destinations: [.mac], + product: .bundle, + bundleId: "eu.davidbures.corkhelp", + settings: .settings(configurations: [ + .debug( + name: "Debug", + xcconfig: .relativeToRoot("xcconfigs/CorkHelp.xcconfig") + ), + .release( + name: "Release", + xcconfig: .relativeToRoot("xcconfigs/CorkHelp.xcconfig") + ), + ]) +) + +let corkTestsTarget: ProjectDescription.Target = .target( + name: "CorkTests", + destinations: [.mac], + product: .unitTests, + bundleId: "eu.davidbures.cork-tests", + sources: [ + "Tests/**", + "Cork/**/*.swift" + ], + dependencies: [ + .target(name: "Cork") + ] +) + let project = Project( name: "Cork", options: .options( @@ -79,81 +158,10 @@ let project = Project( targets: [ corkTarget(configureWithSelfCompiled: false), corkTarget(configureWithSelfCompiled: true), - .target( - name: "CorkShared", - destinations: [.mac], - product: .staticLibrary, - bundleId: "eu.davidbures.cork-shared", - deploymentTargets: .macOS("14.0.0"), - sources: [ - "Modules/Shared/**/*.swift" - ], - dependencies: [ - .external(name: "Defaults") - ], - settings: .settings(configurations: [ - .debug( - name: "Debug", - xcconfig: .relativeToRoot("xcconfigs/Cork.xcconfig") - ), - .release( - name: "Release", - xcconfig: .relativeToRoot("xcconfigs/Cork.xcconfig") - ) - ]) - ), - .target( - name: "CorkNotifications", - destinations: [.mac], - product: .staticLibrary, - bundleId: "eu.davidbures.cork-notifications", - deploymentTargets: .macOS("14.0.0"), - sources: [ - "Modules/Notifications/**/*.swift" - ], - dependencies: [ - .target(name: "CorkShared") - ], - settings: .settings(configurations: [ - .debug( - name: "Debug", - xcconfig: .relativeToRoot("xcconfigs/Cork.xcconfig") - ), - .release( - name: "Release", - xcconfig: .relativeToRoot("xcconfigs/Cork.xcconfig") - ) - ]) - ), - .target( - name: "CorkHelp", - destinations: [.mac], - product: .bundle, - bundleId: "eu.davidbures.corkhelp", - settings: .settings(configurations: [ - .debug( - name: "Debug", - xcconfig: .relativeToRoot("xcconfigs/CorkHelp.xcconfig") - ), - .release( - name: "Release", - xcconfig: .relativeToRoot("xcconfigs/CorkHelp.xcconfig") - ), - ]) - ), - .target( - name: "CorkTests", - destinations: [.mac], - product: .unitTests, - bundleId: "eu.davidbures.cork-tests", - sources: [ - "Tests/**", - "Cork/**/*.swift" - ], - dependencies: [ - .target(name: "Cork") - ] - ) + corkSharedTarget, + corkNotificationsTarget, + corkHelpTarget, + corkTestsTarget ] ) diff --git a/Tuist.swift b/Tuist.swift new file mode 100644 index 00000000..36f943c9 --- /dev/null +++ b/Tuist.swift @@ -0,0 +1,10 @@ +import ProjectDescription + +let config: Config = .init( + project: .tuist( + compatibleXcodeVersions: .upToNextMajor(.init(16, 0, 0)), + swiftVersion: .init(6, 0, 0), + plugins: .init(), + generationOptions: .options(), + installOptions: .options()) +) diff --git a/Tuist/Config.swift b/Tuist/Tuist.swift similarity index 100% rename from Tuist/Config.swift rename to Tuist/Tuist.swift