Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

πŸ”€ :: [#406] Tuist 버전 μ—…κ·Έλ ˆμ΄λ“œ #407

Merged
merged 2 commits into from
Aug 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 11 additions & 7 deletions .github/workflows/bitgouel-ios-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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 }}

Expand All @@ -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
Expand All @@ -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
Expand Down
7 changes: 6 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -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/

Expand Down Expand Up @@ -82,4 +88,3 @@ Derived/
### Tuist managed dependencies ###
Tuist/Dependencies


2 changes: 2 additions & 0 deletions .mise.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[tools]
tuist = "4.23.0"
1 change: 0 additions & 1 deletion .tuist-version

This file was deleted.

14 changes: 7 additions & 7 deletions Makefile
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
Expand Up @@ -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: [:]
)
2 changes: 1 addition & 1 deletion Service/Project.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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)"
Expand Down
30 changes: 0 additions & 30 deletions Tuist/Dependencies.swift

This file was deleted.

77 changes: 77 additions & 0 deletions Tuist/Package.resolved
Original file line number Diff line number Diff line change
@@ -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
}
27 changes: 27 additions & 0 deletions Tuist/Package.swift
Original file line number Diff line number Diff line change
@@ -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"))
]
)
10 changes: 5 additions & 5 deletions Tuist/ProjectDescriptionHelpers/DynamicFramwork.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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"))
Expand All @@ -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],
Expand Down
27 changes: 14 additions & 13 deletions Tuist/ProjectDescriptionHelpers/Executable.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -26,7 +26,7 @@ public extension Project {
)

let schemes: [Scheme] = [
.init(
.scheme(
name: "\(env.name)-DEV",
shared: true,
buildAction: .buildAction(targets: ["\(env.name)"]),
Expand All @@ -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)"]),
Expand All @@ -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)"]),
Expand All @@ -61,34 +61,35 @@ 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/**"],
scripts: scripts,
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))
]
)
],
Expand 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)"]),
Expand Down
Loading