tuist/Package.swift

239 lines
10 KiB
Swift
Raw Normal View History

// swift-tools-version:5.1
2018-04-16 17:01:02 +08:00
import PackageDescription
let package = Package(
2018-07-23 19:59:52 +08:00
name: "tuist",
2020-02-10 03:17:28 +08:00
platforms: [.macOS(.v10_12)],
2018-06-24 21:22:19 +08:00
products: [
2018-07-23 19:59:52 +08:00
.executable(name: "tuist", targets: ["tuist"]),
.executable(name: "tuistenv", targets: ["tuistenv"]),
2018-06-24 21:22:19 +08:00
.library(name: "ProjectDescription",
type: .dynamic,
2018-06-26 13:47:42 +08:00
targets: ["ProjectDescription"]),
/// TuistGenerator
///
/// A high level Xcode generator library
/// responsible for generating Xcode projects & workspaces.
///
/// This library can be used in external tools that wish to
/// leverage Tuist's Xcode generation features.
///
/// Note: This library should be treated as **unstable** as
/// it is still under development and may include breaking
/// changes in future releases.
.library(name: "TuistGenerator",
targets: ["TuistGenerator"]),
2018-06-24 21:22:19 +08:00
],
2018-04-16 17:01:02 +08:00
dependencies: [
.package(url: "https://github.com/tuist/XcodeProj", .upToNextMajor(from: "7.11.0")),
2019-11-23 01:43:56 +08:00
.package(url: "https://github.com/IBM-Swift/BlueSignals", .upToNextMajor(from: "1.0.21")),
2019-12-07 21:27:18 +08:00
.package(url: "https://github.com/ReactiveX/RxSwift.git", .upToNextMajor(from: "5.0.1")),
2019-12-08 00:04:02 +08:00
.package(url: "https://github.com/rnine/Checksum.git", .upToNextMajor(from: "1.0.2")),
2020-02-10 03:17:28 +08:00
.package(url: "https://github.com/apple/swift-log.git", .upToNextMajor(from: "1.2.0")),
.package(url: "https://github.com/thii/xcbeautify.git", .upToNextMajor(from: "0.8.0")),
2020-03-15 16:32:14 +08:00
.package(url: "https://github.com/krzyzanowskim/CryptoSwift", .upToNextMajor(from: "1.3.0")),
2020-03-20 23:20:47 +08:00
.package(url: "https://github.com/stencilproject/Stencil", .branch("master")),
2020-03-23 00:29:17 +08:00
.package(url: "https://github.com/kishikawakatsumi/KeychainAccess.git", .upToNextMajor(from: "4.1.0")),
.package(url: "https://github.com/httpswift/swifter.git", .upToNextMajor(from: "1.4.7")),
.package(url: "https://github.com/apple/swift-tools-support-core", .upToNextMinor(from: "0.1.1")),
.package(url: "https://github.com/apple/swift-argument-parser", .upToNextMajor(from: "0.0.6")),
2020-06-26 22:55:08 +08:00
.package(url: "https://github.com/marmelroy/Zip.git", .upToNextMinor(from: "2.0.0")),
2018-06-26 13:47:42 +08:00
],
2018-04-16 17:01:02 +08:00
targets: [
.target(
name: "TuistCore",
2020-04-21 22:49:31 +08:00
dependencies: ["SwiftToolsSupport-auto", "TuistSupport", "XcodeProj"]
),
.target(
name: "TuistCoreTesting",
2020-02-14 15:45:37 +08:00
dependencies: ["TuistCore", "TuistSupportTesting"]
),
.testTarget(
name: "TuistCoreTests",
dependencies: ["TuistCore", "TuistCoreTesting", "TuistSupportTesting"]
),
.testTarget(
name: "TuistCoreIntegrationTests",
dependencies: ["TuistCore", "TuistSupportTesting"]
),
2018-06-24 20:57:33 +08:00
.target(
2018-07-23 19:59:52 +08:00
name: "TuistKit",
2020-04-21 22:49:31 +08:00
dependencies: ["XcodeProj", "SwiftToolsSupport-auto", "ArgumentParser", "TuistSupport", "TuistGenerator", "TuistCache", "TuistAutomation", "ProjectDescription", "Signals", "RxSwift", "RxBlocking", "Checksum", "TuistLoader", "TuistInsights", "TuistScaffold", "TuistSigning", "TuistCloud"]
),
2018-06-24 20:57:33 +08:00
.testTarget(
2018-07-23 19:59:52 +08:00
name: "TuistKitTests",
2020-06-16 02:59:51 +08:00
dependencies: ["TuistKit", "TuistAutomation", "TuistSupportTesting", "TuistCoreTesting", "ProjectDescription", "RxBlocking", "TuistLoaderTesting", "TuistCacheTesting", "TuistGeneratorTesting", "TuistScaffoldTesting", "TuistCloudTesting", "TuistAutomationTesting", "TuistSigningTesting"]
),
.testTarget(
name: "TuistKitIntegrationTests",
2020-03-22 02:21:55 +08:00
dependencies: ["TuistKit", "TuistCoreTesting", "TuistSupportTesting", "ProjectDescription", "RxBlocking", "TuistLoaderTesting", "TuistCloudTesting"]
),
.target(
2018-07-23 19:59:52 +08:00
name: "tuist",
dependencies: ["TuistKit", "ProjectDescription"]
),
2018-07-02 15:55:59 +08:00
.target(
2018-07-23 19:59:52 +08:00
name: "TuistEnvKit",
2020-04-21 22:49:31 +08:00
dependencies: ["ArgumentParser", "SwiftToolsSupport-auto", "TuistSupport", "RxSwift", "RxBlocking"]
),
2018-07-02 15:55:59 +08:00
.testTarget(
2018-07-23 19:59:52 +08:00
name: "TuistEnvKitTests",
dependencies: ["TuistEnvKit", "TuistSupportTesting"]
),
.target(
2018-07-23 19:59:52 +08:00
name: "tuistenv",
dependencies: ["TuistEnvKit"]
),
.target(
name: "ProjectDescription",
dependencies: []
),
2018-04-16 17:01:02 +08:00
.testTarget(
name: "ProjectDescriptionTests",
dependencies: ["ProjectDescription", "TuistSupportTesting"]
),
2018-10-12 14:20:39 +08:00
.target(
name: "TuistSupport",
2020-06-26 22:55:08 +08:00
dependencies: ["SwiftToolsSupport-auto", "RxSwift", "RxRelay", "Logging", "KeychainAccess", "Swifter", "Signals", "Zip"]
2018-10-12 14:20:39 +08:00
),
.target(
name: "TuistSupportTesting",
2020-04-21 22:49:31 +08:00
dependencies: ["TuistSupport", "SwiftToolsSupport-auto"]
2018-10-12 14:20:39 +08:00
),
.testTarget(
name: "TuistSupportTests",
2019-12-17 17:30:59 +08:00
dependencies: ["TuistSupport", "TuistSupportTesting", "RxBlocking"]
2018-10-12 14:20:39 +08:00
),
2019-12-09 04:48:47 +08:00
.testTarget(
name: "TuistSupportIntegrationTests",
dependencies: ["TuistSupport", "TuistSupportTesting", "RxBlocking"]
),
.target(
name: "TuistGenerator",
dependencies: ["XcodeProj", "SwiftToolsSupport-auto", "TuistCore", "TuistSupport", "RxBlocking"]
),
2020-03-02 16:58:05 +08:00
.target(
name: "TuistGeneratorTesting",
dependencies: ["TuistGenerator", "TuistCoreTesting", "TuistSupportTesting"]
),
.testTarget(
name: "TuistGeneratorTests",
2020-06-16 02:59:51 +08:00
dependencies: ["TuistGenerator", "TuistSupportTesting", "TuistCoreTesting", "TuistGeneratorTesting", "TuistSigningTesting"]
),
.testTarget(
name: "TuistGeneratorIntegrationTests",
Generator update - leveraging intermediate descriptors (#1007) ### Short description When using `TuistGenerator` as a library, the generator component performs several actions: - Loading of the graph - Linting the graph - XcodeProj generation - Writing generation artifacts to disk - Post generation actions While convenient it doesn't offer flexibility to perform any custom linting or post processing on the generated XcodeProj representations or to selectively leverage some of those actions without the others. ### Solution Based on a few early prototyping rounds on [tuist-labs](https://github.com/tuist/tuist-labs/tree/prototype/pipelines) and discussions on modularising Tuist even further, we can split the responsibilities of the generator to provide more flexibility and simplicity. - Update the generator to return descriptors (it doesn't directly perform any operations - it's side effect free) - Create a dedicated component to write those descriptions to disk as well as perform any required side effects - Move some of the interactors that performed side effects out of the xcodeproj generation to help group them (e.g. CocoaPods / Swift PM) - Create a new top level component to orchestrate all those steps to achieve the previous behaviour _**Note:** These changes should have no impact on end users of Tuist_ ### Implementation - [x] Prototype `Descriptors` by having existing components return descriptors instead of performing actions (initially as duplicate methods for testing/prototyping) - [x] Integrate a prototype of a high level `ProjectGenerator` that performs all the previous tasks with the `tuist generate` command - [x] Verify acceptance tests don't flag any regressions - [x] Delete duplicate methods (the non-descriptor) variants and update their corresponding unit tests - [x] Integrate the updated generator with the other tuist commands - [x] Come up with better component names to clarify their purpose _(current names were temporary to avoid name collisions however could be confusing)_ - [x] Update change log ### Test Plan - Verify all acceptance tests pass - Test out running `tuist generate` on any of the fixtures
2020-03-11 23:45:52 +08:00
dependencies: ["TuistGenerator", "TuistSupportTesting", "TuistCoreTesting", "TuistGeneratorTesting"]
),
2019-12-19 22:42:10 +08:00
.target(
2020-02-07 13:33:59 +08:00
name: "TuistCache",
2020-04-21 22:49:31 +08:00
dependencies: ["XcodeProj", "SwiftToolsSupport-auto", "TuistCore", "TuistSupport", "Checksum", "RxSwift"]
2019-12-19 22:42:10 +08:00
),
.testTarget(
2020-02-07 13:33:59 +08:00
name: "TuistCacheTests",
2020-04-03 21:37:00 +08:00
dependencies: ["TuistCache", "TuistSupportTesting", "TuistCoreTesting", "RxBlocking", "TuistCacheTesting"]
2019-12-19 22:42:10 +08:00
),
2020-02-17 23:15:37 +08:00
.target(
name: "TuistCacheTesting",
2020-04-21 22:49:31 +08:00
dependencies: ["TuistCache", "SwiftToolsSupport-auto", "TuistCore", "RxTest", "RxSwift"]
2020-02-17 23:15:37 +08:00
),
2020-03-22 02:21:55 +08:00
.target(
name: "TuistCloud",
2020-04-21 22:49:31 +08:00
dependencies: ["XcodeProj", "SwiftToolsSupport-auto", "TuistCore", "TuistSupport", "Checksum", "RxSwift"]
2020-03-22 02:21:55 +08:00
),
.testTarget(
name: "TuistCloudTests",
dependencies: ["TuistCloud", "TuistSupportTesting", "TuistCoreTesting", "RxBlocking"]
),
.target(
name: "TuistCloudTesting",
2020-04-21 22:49:31 +08:00
dependencies: ["TuistCloud", "SwiftToolsSupport-auto", "TuistCore", "RxTest", "RxSwift"]
2020-03-22 02:21:55 +08:00
),
2019-12-19 22:42:10 +08:00
.testTarget(
2020-02-07 13:33:59 +08:00
name: "TuistCacheIntegrationTests",
2020-02-14 16:58:22 +08:00
dependencies: ["TuistCache", "TuistSupportTesting", "RxBlocking", "TuistCoreTesting"]
2019-12-19 22:42:10 +08:00
),
2020-03-12 23:01:13 +08:00
.target(
2020-03-17 02:11:52 +08:00
name: "TuistScaffold",
2020-04-21 22:49:31 +08:00
dependencies: ["SwiftToolsSupport-auto", "TuistCore", "TuistSupport", "Stencil"]
2020-03-12 23:01:13 +08:00
),
.target(
2020-03-17 02:11:52 +08:00
name: "TuistScaffoldTesting",
dependencies: ["TuistScaffold"]
2020-03-12 23:01:13 +08:00
),
2020-03-20 23:20:47 +08:00
.testTarget(
name: "TuistScaffoldTests",
dependencies: ["TuistScaffold", "TuistSupportTesting", "TuistCoreTesting"]
2020-03-20 23:20:47 +08:00
),
2020-03-12 23:01:13 +08:00
.testTarget(
2020-03-17 02:11:52 +08:00
name: "TuistScaffoldIntegrationTests",
dependencies: ["TuistScaffold", "TuistSupportTesting"]
2020-03-12 23:01:13 +08:00
),
2019-12-19 22:42:10 +08:00
.target(
2019-12-26 18:37:03 +08:00
name: "TuistAutomation",
2020-04-21 22:49:31 +08:00
dependencies: ["XcodeProj", "SwiftToolsSupport-auto", "TuistCore", "TuistSupport", "XcbeautifyLib"]
2019-12-19 22:42:10 +08:00
),
.testTarget(
name: "TuistAutomationTests",
dependencies: ["TuistAutomation", "TuistSupportTesting", "TuistCoreTesting"]
2019-12-19 22:42:10 +08:00
),
.target(
name: "TuistAutomationTesting",
dependencies: ["TuistAutomation", "SwiftToolsSupport-auto", "TuistCore", "TuistCoreTesting", "ProjectDescription", "TuistSupportTesting"]
),
2019-12-19 22:42:10 +08:00
.testTarget(
name: "TuistAutomationIntegrationTests",
dependencies: ["TuistAutomation", "TuistSupportTesting"]
),
2020-03-11 20:18:25 +08:00
.target(
name: "TuistInsights",
2020-04-21 22:49:31 +08:00
dependencies: ["XcodeProj", "SwiftToolsSupport-auto", "TuistCore", "TuistSupport", "XcbeautifyLib"]
2020-03-11 20:18:25 +08:00
),
.testTarget(
name: "TuistInsightsTests",
dependencies: ["TuistInsights", "TuistSupportTesting"]
),
.testTarget(
name: "TuistInsightsIntegrationTests",
dependencies: ["TuistInsights", "TuistSupportTesting"]
),
2020-03-06 04:53:02 +08:00
.target(
name: "TuistSigning",
2020-03-15 16:32:14 +08:00
dependencies: ["TuistCore", "TuistSupport", "CryptoSwift"]
2020-03-06 04:53:02 +08:00
),
2020-06-16 02:59:51 +08:00
.target(
name: "TuistSigningTesting",
dependencies: ["TuistSigning"]
),
2020-03-06 04:53:02 +08:00
.testTarget(
name: "TuistSigningTests",
2020-06-16 02:59:51 +08:00
dependencies: ["TuistSigning", "TuistSupportTesting", "TuistCoreTesting", "TuistSigningTesting"]
),
.testTarget(
name: "TuistSigningIntegrationTests",
dependencies: ["TuistSigning", "TuistSupportTesting", "TuistCoreTesting", "TuistSigningTesting"]
2020-03-06 04:53:02 +08:00
),
2019-12-26 17:52:05 +08:00
.target(
2019-12-26 18:37:03 +08:00
name: "TuistLoader",
2020-04-21 22:49:31 +08:00
dependencies: ["XcodeProj", "SwiftToolsSupport-auto", "TuistCore", "TuistSupport", "ProjectDescription"]
2019-12-26 17:52:05 +08:00
),
2019-12-26 18:37:03 +08:00
.target(
name: "TuistLoaderTesting",
dependencies: ["TuistLoader", "SwiftToolsSupport-auto", "TuistCore", "ProjectDescription", "TuistSupportTesting"]
2019-12-26 18:37:03 +08:00
),
2019-12-26 17:52:05 +08:00
.testTarget(
name: "TuistLoaderTests",
2020-03-17 17:21:16 +08:00
dependencies: ["TuistLoader", "TuistSupportTesting", "TuistLoaderTesting", "TuistCoreTesting"]
2019-12-26 17:52:05 +08:00
),
2019-12-26 18:37:03 +08:00
.testTarget(
name: "TuistLoaderIntegrationTests",
dependencies: ["TuistLoader", "TuistSupportTesting", "ProjectDescription"]
2019-12-26 18:37:03 +08:00
),
.testTarget(
name: "TuistIntegrationTests",
dependencies: ["TuistGenerator", "TuistSupportTesting", "TuistSupport", "TuistCoreTesting", "TuistLoaderTesting"]
),
2018-06-26 13:47:42 +08:00
]
2018-04-16 17:01:02 +08:00
)