From 436792af7ccecf3ddb77cb76acfa85227e9edd0f Mon Sep 17 00:00:00 2001
From: uuuunseo <jdbstjoo@gmail.com>
Date: Wed, 14 Aug 2024 11:45:54 +0900
Subject: [PATCH 1/2] :arrow_up: :: [#406] tuist version 3.28.0 -> 4.23.0

---
 .gitignore                                    |  7 +-
 .mise.toml                                    |  2 +
 .tuist-version                                |  1 -
 Makefile                                      | 14 ++--
 .../ProjectEnvironment.swift                  |  8 +-
 Service/Project.swift                         |  2 +-
 Tuist/Dependencies.swift                      | 30 --------
 Tuist/Package.resolved                        | 77 +++++++++++++++++++
 Tuist/Package.swift                           | 27 +++++++
 .../DynamicFramwork.swift                     | 10 +--
 .../Executable.swift                          | 27 +++----
 11 files changed, 143 insertions(+), 62 deletions(-)
 create mode 100644 .mise.toml
 delete mode 100644 .tuist-version
 delete mode 100644 Tuist/Dependencies.swift
 create mode 100644 Tuist/Package.resolved
 create mode 100644 Tuist/Package.swift

diff --git a/.gitignore b/.gitignore
index ee2493c7f..f36ff00aa 100644
--- a/.gitignore
+++ b/.gitignore
@@ -38,6 +38,12 @@ Temporary Items
 #
 # gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore
 
+## Playgrounds
+timeline.xctimeline
+playground.xcworkspace
+
+.build/
+
 ## User settings
 xcuserdata/
 
@@ -82,4 +88,3 @@ Derived/
 ### Tuist managed dependencies ###
 Tuist/Dependencies
 
-
diff --git a/.mise.toml b/.mise.toml
new file mode 100644
index 000000000..a570f6974
--- /dev/null
+++ b/.mise.toml
@@ -0,0 +1,2 @@
+[tools]
+tuist = "4.23.0"
\ No newline at end of file
diff --git a/.tuist-version b/.tuist-version
deleted file mode 100644
index 0f414fd3e..000000000
--- a/.tuist-version
+++ /dev/null
@@ -1 +0,0 @@
-3.28.0
\ No newline at end of file
diff --git a/Makefile b/Makefile
index 6f4bea42d..7031d041a 100644
--- a/Makefile
+++ b/Makefile
@@ -1,20 +1,20 @@
 generate:
-	tuist fetch
-	tuist generate
+	mise exec -- tuist install
+	mise exec -- tuist generate
 
 ci_generate:
-	tuist fetch
-	TUIST_ENV=CI tuist generate
+	mise exec -- tuist install
+	TUIST_ENV=CI mise exec -- tuist generate
 
 cd_generate:
-	tuist fetch
-	TUIST_ENV=CD tuist generate
+	mise exec -- tuist install
+	TUIST_ENV=CD mise exec -- tuist generate
 
 clean:
 	rm -rf **/*.xcodeproj
 	rm -rf *.xcworkspace
 
 reset:
-	tuist clean
+	mise exec -- tuist clean
 	rm -rf **/*.xcodeproj
 	rm -rf *.xcworkspace
diff --git a/Plugin/EnvironmentPlugin/ProjectDescriptionHelpers/ProjectEnvironment.swift b/Plugin/EnvironmentPlugin/ProjectDescriptionHelpers/ProjectEnvironment.swift
index eb8872d9b..2222a0fc1 100644
--- a/Plugin/EnvironmentPlugin/ProjectDescriptionHelpers/ProjectEnvironment.swift
+++ b/Plugin/EnvironmentPlugin/ProjectDescriptionHelpers/ProjectEnvironment.swift
@@ -4,15 +4,15 @@ import ProjectDescription
 public struct ProjectEnvironment {
     public let name: String
     public let organizationName: String
-    public let deploymentTarget: DeploymentTarget
-    public let platform: Platform
+    public let deploymentTarget: DeploymentTargets
+    public let destination: Set<Destination>
     public let baseSetting: SettingsDictionary
 }
 
 public let env = ProjectEnvironment(
     name: "Bitgouel",
     organizationName: "team.msg",
-    deploymentTarget: .iOS(targetVersion: "15.0", devices: [.iphone]),
-    platform: .iOS,
+    deploymentTarget: .iOS("15.0"),
+    destination: .iOS,
     baseSetting: [:]
 )
diff --git a/Service/Project.swift b/Service/Project.swift
index 85de9a598..e123c5ffb 100644
--- a/Service/Project.swift
+++ b/Service/Project.swift
@@ -16,7 +16,7 @@ let configurations: [Configuration] = generateEnvironment == .ci ?
 
 let project = Project.dynamicFramwork(
     name: "Service",
-    platform: .iOS,
+    destination: .iOS,
     infoPlist: .extendingDefault(
         with: [
             "BASE_URL": "$(BASE_URL)"
diff --git a/Tuist/Dependencies.swift b/Tuist/Dependencies.swift
deleted file mode 100644
index 477b9a97f..000000000
--- a/Tuist/Dependencies.swift
+++ /dev/null
@@ -1,30 +0,0 @@
-import ConfigurationPlugin
-import ProjectDescription
-
-let dependencies = Dependencies(
-    carthage: nil,
-    swiftPackageManager: SwiftPackageManagerDependencies(
-        [
-            .remote(
-                url: "https://github.com/Moya/Moya.git",
-                requirement: .upToNextMajor(from: "15.0.3")
-            ),
-            .remote(
-                url: "https://github.com/uber/needle.git",
-                requirement: .upToNextMajor(from: "0.24.0")
-            ),
-            .remote(
-                url: "https://github.com/kean/NukeUI.git",
-                requirement: .upToNextMajor(from: "0.8.3")
-            )
-        ],
-        baseSettings: .settings(
-            configurations: [
-                .debug(name: .dev),
-                .debug(name: .stage),
-                .release(name: .prod)
-            ]
-        )
-    ),
-    platforms: [.iOS]
-)
diff --git a/Tuist/Package.resolved b/Tuist/Package.resolved
new file mode 100644
index 000000000..8ea33a6d2
--- /dev/null
+++ b/Tuist/Package.resolved
@@ -0,0 +1,77 @@
+{
+  "pins" : [
+    {
+      "identity" : "alamofire",
+      "kind" : "remoteSourceControl",
+      "location" : "https://github.com/Alamofire/Alamofire.git",
+      "state" : {
+        "revision" : "f455c2975872ccd2d9c81594c658af65716e9b9a",
+        "version" : "5.9.1"
+      }
+    },
+    {
+      "identity" : "gifu",
+      "kind" : "remoteSourceControl",
+      "location" : "https://github.com/kaishin/Gifu",
+      "state" : {
+        "revision" : "82da0086dea14ca9afc9801234ad8dc4cd9e2738",
+        "version" : "3.4.1"
+      }
+    },
+    {
+      "identity" : "moya",
+      "kind" : "remoteSourceControl",
+      "location" : "https://github.com/Moya/Moya.git",
+      "state" : {
+        "revision" : "c263811c1f3dbf002be9bd83107f7cdc38992b26",
+        "version" : "15.0.3"
+      }
+    },
+    {
+      "identity" : "needle",
+      "kind" : "remoteSourceControl",
+      "location" : "https://github.com/uber/needle.git",
+      "state" : {
+        "revision" : "6db73ae873952794b94fd6bb5111554e23c160af",
+        "version" : "0.24.0"
+      }
+    },
+    {
+      "identity" : "nuke",
+      "kind" : "remoteSourceControl",
+      "location" : "https://github.com/kean/Nuke.git",
+      "state" : {
+        "revision" : "a002b7fd786f2df2ed4333fe73a9727499fd9d97",
+        "version" : "10.11.2"
+      }
+    },
+    {
+      "identity" : "nukeui",
+      "kind" : "remoteSourceControl",
+      "location" : "https://github.com/kean/NukeUI.git",
+      "state" : {
+        "revision" : "db55022a8e483774ebbf3568727071477546d9ea",
+        "version" : "0.8.3"
+      }
+    },
+    {
+      "identity" : "reactiveswift",
+      "kind" : "remoteSourceControl",
+      "location" : "https://github.com/ReactiveCocoa/ReactiveSwift.git",
+      "state" : {
+        "revision" : "c43bae3dac73fdd3cb906bd5a1914686ca71ed3c",
+        "version" : "6.7.0"
+      }
+    },
+    {
+      "identity" : "rxswift",
+      "kind" : "remoteSourceControl",
+      "location" : "https://github.com/ReactiveX/RxSwift.git",
+      "state" : {
+        "revision" : "b06a8c8596e4c3e8e7788e08e720e3248563ce6a",
+        "version" : "6.7.1"
+      }
+    }
+  ],
+  "version" : 2
+}
diff --git a/Tuist/Package.swift b/Tuist/Package.swift
new file mode 100644
index 000000000..084073ef7
--- /dev/null
+++ b/Tuist/Package.swift
@@ -0,0 +1,27 @@
+// swift-tools-version: 5.9
+import PackageDescription
+
+#if TUIST
+    import ProjectDescription
+    import ProjectDescriptionHelpers
+
+    let packageSettings = PackageSettings(
+        productTypes: [:],
+        baseSettings: .settings(
+            configurations: [
+                .debug(name: .dev),
+                .debug(name: .stage),
+                .release(name: .prod)
+            ]
+        )
+    )
+#endif
+
+let package = Package(
+    name: "MyApp",
+    dependencies: [
+        .package(url: "https://github.com/Moya/Moya.git", .upToNextMajor(from: "15.0.3")),
+        .package(url: "https://github.com/uber/needle.git", .upToNextMajor(from: "0.24.0")),
+        .package(url: "https://github.com/kean/NukeUI.git", .upToNextMajor(from: "0.8.3"))
+    ]
+)
diff --git a/Tuist/ProjectDescriptionHelpers/DynamicFramwork.swift b/Tuist/ProjectDescriptionHelpers/DynamicFramwork.swift
index 652975f2b..a2a0ef6bc 100644
--- a/Tuist/ProjectDescriptionHelpers/DynamicFramwork.swift
+++ b/Tuist/ProjectDescriptionHelpers/DynamicFramwork.swift
@@ -7,10 +7,10 @@ let isCI = (ProcessInfo.processInfo.environment["TUIST_CI"] ?? "0") == "1" ? tru
 public extension Project {
     static func dynamicFramwork(
         name: String,
-        platform: Platform = env.platform,
+        destination: Set<Destination> = env.destination,
         packages: [Package] = [],
         infoPlist: InfoPlist = .default,
-        deploymentTarget: DeploymentTarget,
+        deploymentTarget: DeploymentTargets,
         configurations: [Configuration] = [],
         dependencies: [TargetDependency] = [
             .project(target: "ThirdPartyLib", path: Path("../ThirdPartyLib"))
@@ -31,12 +31,12 @@ public extension Project {
                 defaultSettings: .recommended
             ),
             targets: [
-                Target(
+                .target(
                     name: name,
-                    platform: platform,
+                    destinations: destination,
                     product: .framework,
                     bundleId: "\(env.organizationName).\(name)",
-                    deploymentTarget: env.deploymentTarget,
+                    deploymentTargets: env.deploymentTarget,
                     infoPlist: infoPlist,
                     sources: ["Sources/**"],
                     scripts: [.swiftLint],
diff --git a/Tuist/ProjectDescriptionHelpers/Executable.swift b/Tuist/ProjectDescriptionHelpers/Executable.swift
index c5aa923ea..41eedb2f6 100644
--- a/Tuist/ProjectDescriptionHelpers/Executable.swift
+++ b/Tuist/ProjectDescriptionHelpers/Executable.swift
@@ -4,7 +4,7 @@ import ProjectDescription
 public extension Project {
     static func executable(
         name: String,
-        platform: Platform = env.platform,
+        destination: Set<Destination> = env.destination,
         product: Product,
         packages: [Package] = [],
         settings: Settings? = nil,
@@ -26,7 +26,7 @@ public extension Project {
         )
 
         let schemes: [Scheme] = [
-            .init(
+            .scheme(
                 name: "\(env.name)-DEV",
                 shared: true,
                 buildAction: .buildAction(targets: ["\(env.name)"]),
@@ -35,7 +35,7 @@ public extension Project {
                 profileAction: .profileAction(configuration: .dev),
                 analyzeAction: .analyzeAction(configuration: .dev)
             ),
-            .init(
+            .scheme(
                 name: "\(env.name)-STAGE",
                 shared: true,
                 buildAction: .buildAction(targets: ["\(env.name)"]),
@@ -44,7 +44,7 @@ public extension Project {
                 profileAction: .profileAction(configuration: .stage),
                 analyzeAction: .analyzeAction(configuration: .stage)
             ),
-            .init(
+            .scheme(
                 name: "\(env.name)-PROD",
                 shared: true,
                 buildAction: .buildAction(targets: ["\(env.name)"]),
@@ -61,12 +61,12 @@ public extension Project {
             packages: packages,
             settings: settings,
             targets: [
-                .init(
+                .target(
                     name: name,
-                    platform: platform,
+                    destinations: destination,
                     product: product,
                     bundleId: "\(env.organizationName).\(name)",
-                    deploymentTarget: env.deploymentTarget,
+                    deploymentTargets: env.deploymentTarget,
                     infoPlist: .file(path: Path("Support/Info.plist")),
                     sources: ["Sources/**"],
                     resources: ["Resources/**"],
@@ -74,21 +74,22 @@ public extension Project {
                     dependencies: [
                         .project(
                             target: "ThirdPartyLib",
-                            path: Path("../ThirdPartyLib")
+                            path: Path("../ThirdPartyLib"),
+                            condition: .when(.all)
                         ),
                     ] + dependencies,
                     settings: settings
                 ),
-                .init(
+                .target(
                     name: "\(name)Test",
-                    platform: platform,
+                    destinations: destination,
                     product: .unitTests,
                     bundleId: "\(env.organizationName).\(name)Test",
-                    deploymentTarget: env.deploymentTarget,
+                    deploymentTargets: env.deploymentTarget,
                     infoPlist: .default,
                     sources: ["Tests/**"],
                     dependencies: [
-                        .target(name: name)
+                        .target(name: name, condition: .when(.all))
                     ]
                 )
             ],
@@ -99,7 +100,7 @@ public extension Project {
 
 extension Scheme {
     static func makeScheme(target: ConfigurationName, name: String) -> Scheme {
-        return .init(
+        return .scheme(
             name: name,
             shared: true,
             buildAction: .buildAction(targets: ["\(name)"]),

From 2905a4856447aeadf6ecfff490d351af26917c3e Mon Sep 17 00:00:00 2001
From: uuuunseo <jdbstjoo@gmail.com>
Date: Wed, 14 Aug 2024 11:57:53 +0900
Subject: [PATCH 2/2] =?UTF-8?q?:pencil2:=20::=20[#406]=20workflows=20/=20t?=
 =?UTF-8?q?uist=20fetch=20->=20install=20mise=20action=20=EC=B6=94?=
 =?UTF-8?q?=EA=B0=80,=20macos=20=EB=B2=84=EC=A0=84=20=EC=84=A4=EC=A0=95?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 .github/workflows/bitgouel-ios-ci.yml | 18 +++++++++++-------
 1 file changed, 11 insertions(+), 7 deletions(-)

diff --git a/.github/workflows/bitgouel-ios-ci.yml b/.github/workflows/bitgouel-ios-ci.yml
index 2799f1ac2..1069f66d7 100644
--- a/.github/workflows/bitgouel-ios-ci.yml
+++ b/.github/workflows/bitgouel-ios-ci.yml
@@ -13,13 +13,16 @@ env:
 jobs:
   prepare-dependency:
     name: ⚙️ Prepare-Dependency
-    runs-on: macos-latest
+    runs-on: macos-14
 
     steps:
       - uses: actions/checkout@v4
+      - uses: jdx/mise-action@v2
+        with:
+          xcode-version: 15.2
 
       - name: Install tuist
-        run: curl -Ls https://install.tuist.io | bash
+        run: mise install tuist
 
       - name: Compute dependency cache key
         id: compute_hash
@@ -34,7 +37,7 @@ jobs:
 
       - name: Install dependencies
         if: steps.cache_dependencies.outputs.cache-hit == ''
-        run: tuist fetch
+        run: tuist install
     outputs:
       dependency_cache_key: ${{ steps.compute_hash.outputs.hash }}
 
@@ -45,11 +48,12 @@ jobs:
 
     steps:
     - uses: actions/checkout@v2
+    - uses: jdx/mise-action@v2
       with:
-        xcode-version: latest
+        xcode-version: 15.2
 
     - name: Install tuist
-      run: curl -Ls https://install.tuist.io | bash
+      run: mise install tuist
 
     - name: Check dependency cache
       uses: actions/cache@v3
@@ -60,10 +64,10 @@ jobs:
 
     - name: Install dependencies
       if: steps.cache_dependencies.outputs.cache-hit != 'true'
-      run: tuist fetch
+      run: tuist install
 
     - name: Test with tuist
-      run: TUIST_ENV=CI tuist test
+      run: TUIST_ENV=CI tuist test --no-selective-testing
 
     - name: Bitgouel iOS CI Discord Notification
       uses: sarisia/actions-status-discord@v1