Skip to content

Commit

Permalink
[CAT-10] Tuist 설정 (#5)
Browse files Browse the repository at this point in the history
  • Loading branch information
devMinseok authored Jul 16, 2024
1 parent 4fb2185 commit 1155c29
Show file tree
Hide file tree
Showing 131 changed files with 3,275 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
### 관련된 문서 📄

### 무엇에 관한 PR 인가요? 🙋

### 어떤 것을 작업하셨나요? 🛠
15 changes: 15 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: CI

on:
pull_request:
workflow_dispatch:

jobs:
lint:
name: Run Swiftlint
runs-on: macos-14
steps:
- uses: actions/checkout@v4
- name: Run Swiftlint
run: |
SwiftLint/swiftlint lint --config SwiftLint/swiftlint.yml --quiet --reporter github-actions-logging
76 changes: 76 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
# Created by https://www.gitignore.io/api/swift,macos

### macOS ###
*.DS_Store
.AppleDouble
.LSOverride

# Files that might appear in the root of a volume
.DocumentRevisions-V100
.fseventsd
.Spotlight-V100
.TemporaryItems
.Trashes
.VolumeIcon.icns
.com.apple.timemachine.donotpresent

# Directories potentially created on remote AFP share
.AppleDB
.AppleDesktop
Network Trash Folder
Temporary Items
.apdisk

### Swift ###
# Xcode

## Build generated
DerivedData/

## Various settings
*.pbxuser
!default.pbxuser
*.mode1v3
!default.mode1v3
*.mode2v3
!default.mode2v3
*.perspectivev3
!default.perspectivev3
xcuserdata/

## Other
*.moved-aside
*.xccheckout
*.xcscmblueprint

## Obj-C/Swift specific
*.hmap
*.ipa

## Playgrounds
timeline.xctimeline
playground.xcworkspace

# Swift Package Manager
.build/
.swiftpm

# End of https://www.gitignore.io/api/swift,macos

## Projects ##
**/*.xcodeproj
**/*.xcworkspace

## LicensePlist ##
**/Settings.bundle/License
**/Settings.bundle/License.plist

## Tuist ##
graph.dot
Derived/
Tuist/Dependencies/SwiftPackageManager
Tuist/Dependencies/graph.json

## XCFramework ##
XCFramework/Cartfile.resolved
XCFramework/Carthage
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.18.0"
6 changes: 6 additions & 0 deletions DependencyGraph/graphMaker.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
tuist graph PomoNyang -d -t -f dot
sed -i '' '/Example/d; /ThirdParty_/d' graph.dot
dot -Tpng graph.dot -o DependencyGraph/pomonyang_graph.png
rm graph.dot

open DependencyGraph/pomonyang_graph.png
Binary file added DependencyGraph/pomonyang_graph.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
42 changes: 42 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
### Tuist ###

.PHONY: install
install:
carthage update --platform iOS --use-xcframeworks --use-netrc --cache-builds --verbose --project-directory "XCFramework/"
tuist install

.PHONY: generate
generate:
TUIST_ROOT_DIR=${PWD} TUIST_BUILD_CONFIG=${config} tuist generate ${target}

.PHONY: cache
cache:
TUIST_ROOT_DIR=${PWD} tuist cache ${target} --external-only

.PHONY: module
module:
tuist scaffold Framework --layer ${layer} --name ${name}

.PHONY: cleanj
clean:
tuist clean
rm -rf XCFramework/Carthage
rm -rf *.xcworkspace
find Projects -name "*.xcodeproj" -exec rm -rf {} \;


### SUGAR ###

.PHONY: pomonyang
pomonyang:
make generate config=${config} target="PomoNyang"

### Script ###

.PHONY: graph
graph:
sh DependencyGraph/graphMaker.sh

.PHONY: template
template:
sh file_template/install_template.sh
167 changes: 167 additions & 0 deletions Package.resolved
Original file line number Diff line number Diff line change
@@ -0,0 +1,167 @@
{
"pins" : [
{
"identity" : "alamofire",
"kind" : "remoteSourceControl",
"location" : "https://github.com/Alamofire/Alamofire.git",
"state" : {
"revision" : "f455c2975872ccd2d9c81594c658af65716e9b9a",
"version" : "5.9.1"
}
},
{
"identity" : "combine-schedulers",
"kind" : "remoteSourceControl",
"location" : "https://github.com/pointfreeco/combine-schedulers",
"state" : {
"revision" : "9dc9cbe4bc45c65164fa653a563d8d8db61b09bb",
"version" : "1.0.0"
}
},
{
"identity" : "kakao-ios-sdk",
"kind" : "remoteSourceControl",
"location" : "https://github.com/kakao/kakao-ios-sdk.git",
"state" : {
"revision" : "b7a78bac4cb015fc3b1de34255b96421091fcf42",
"version" : "2.22.0"
}
},
{
"identity" : "moya",
"kind" : "remoteSourceControl",
"location" : "https://github.com/Moya/Moya.git",
"state" : {
"revision" : "c263811c1f3dbf002be9bd83107f7cdc38992b26",
"version" : "15.0.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"
}
},
{
"identity" : "swift-case-paths",
"kind" : "remoteSourceControl",
"location" : "https://github.com/pointfreeco/swift-case-paths",
"state" : {
"revision" : "b9ad2661b6e8fb411fef6a441c9955c3413afac0",
"version" : "1.5.0"
}
},
{
"identity" : "swift-clocks",
"kind" : "remoteSourceControl",
"location" : "https://github.com/pointfreeco/swift-clocks",
"state" : {
"revision" : "a8421d68068d8f45fbceb418fbf22c5dad4afd33",
"version" : "1.0.2"
}
},
{
"identity" : "swift-collections",
"kind" : "remoteSourceControl",
"location" : "https://github.com/apple/swift-collections",
"state" : {
"revision" : "3d2dc41a01f9e49d84f0a3925fb858bed64f702d",
"version" : "1.1.2"
}
},
{
"identity" : "swift-composable-architecture",
"kind" : "remoteSourceControl",
"location" : "https://github.com/pointfreeco/swift-composable-architecture.git",
"state" : {
"revision" : "1f952d8c69ace5e53bb69a218e6ed00e03a4695c",
"version" : "1.11.2"
}
},
{
"identity" : "swift-concurrency-extras",
"kind" : "remoteSourceControl",
"location" : "https://github.com/pointfreeco/swift-concurrency-extras",
"state" : {
"revision" : "bb5059bde9022d69ac516803f4f227d8ac967f71",
"version" : "1.1.0"
}
},
{
"identity" : "swift-custom-dump",
"kind" : "remoteSourceControl",
"location" : "https://github.com/pointfreeco/swift-custom-dump",
"state" : {
"revision" : "f01efb26f3a192a0e88dcdb7c3c391ec2fc25d9c",
"version" : "1.3.0"
}
},
{
"identity" : "swift-dependencies",
"kind" : "remoteSourceControl",
"location" : "https://github.com/pointfreeco/swift-dependencies",
"state" : {
"revision" : "9085501f168b08f5205b68f1b8a0d56bb52b8c1a",
"version" : "1.3.2"
}
},
{
"identity" : "swift-identified-collections",
"kind" : "remoteSourceControl",
"location" : "https://github.com/pointfreeco/swift-identified-collections",
"state" : {
"revision" : "2f5ab6e091dd032b63dacbda052405756010dc3b",
"version" : "1.1.0"
}
},
{
"identity" : "swift-perception",
"kind" : "remoteSourceControl",
"location" : "https://github.com/pointfreeco/swift-perception",
"state" : {
"revision" : "68901eac31c13c7d1ffef8e1bd8c3870ca2eaa95",
"version" : "1.3.2"
}
},
{
"identity" : "swift-syntax",
"kind" : "remoteSourceControl",
"location" : "https://github.com/apple/swift-syntax",
"state" : {
"revision" : "4c6cc0a3b9e8f14b3ae2307c5ccae4de6167ac2c",
"version" : "600.0.0-prerelease-2024-06-12"
}
},
{
"identity" : "swiftui-navigation",
"kind" : "remoteSourceControl",
"location" : "https://github.com/pointfreeco/swiftui-navigation",
"state" : {
"revision" : "b7c9a79f6f6b1fefb87d3e5a83a9c2fe7cdc9720",
"version" : "1.5.0"
}
},
{
"identity" : "xctest-dynamic-overlay",
"kind" : "remoteSourceControl",
"location" : "https://github.com/pointfreeco/xctest-dynamic-overlay",
"state" : {
"revision" : "6f30bdba373bbd7fbfe241dddd732651f2fbd1e2",
"version" : "1.1.2"
}
}
],
"version" : 2
}
31 changes: 31 additions & 0 deletions Package.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
// swift-tools-version: 5.9
import PackageDescription

#if TUIST
import struct ProjectDescription.PackageSettings
import ProjectDescriptionHelpers

let packageSettings: PackageSettings = .init(
productTypes: [
"Moya": .framework,
"KakaoSDKCommon": .framework,
"KakaoSDKAuth": .framework,
// "KakaoSDKUser": .framework,
// "KakaoSDKTalk": .framework,
// "KakaoSDKShare": .framework,
// "KakaoSDKNavi": .framework,
// "KakaoSDKTemplate": .framework,
],
baseSettings: .packageSettings
)
#endif

let package: Package = .init(
name: "PomoNyang",
platforms: [.iOS(.v17)],
dependencies: [
.package(url: "https://github.com/pointfreeco/swift-composable-architecture.git", exact: "1.11.2"),
.package(url: "https://github.com/kakao/kakao-ios-sdk.git", exact: "2.22.0"),
.package(url: "https://github.com/Moya/Moya.git", exact: "15.0.3")
]
)
10 changes: 10 additions & 0 deletions Plugins/DependencyPlugin/Plugin.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
//
// Plugin.swift
// DependencyPlugin
//
// Created by MinseokKang on 2024/07/15.
//

import ProjectDescription

let dependencyPlugin = Plugin(name: "DependencyPlugin")
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
//
// DEP+SPMTarget.swift
// DependencyPlugin
//
// Created by MinseokKang on 2024/07/15.
//

import ProjectDescription

extension DEP {
/// SwiftPackageManager for Target
public enum SPMTarget {}
}

public extension DEP.SPMTarget {
// MARK: - Architecture
static let ComposableArchitecture: TargetDependency = .external(name: "ComposableArchitecture")

// MARK: - KakaoSDK
static let KakaoSDKCommon: TargetDependency = .external(name: "KakaoSDKCommon")
static let KakaoSDKAuth: TargetDependency = .external(name: "KakaoSDKAuth")
static let KakaoSDKUser: TargetDependency = .external(name: "KakaoSDKUser")
static let KakaoSDKTalk: TargetDependency = .external(name: "KakaoSDKTalk")
static let KakaoSDKShare: TargetDependency = .external(name: "KakaoSDKShare")
static let KakaoSDKNavi: TargetDependency = .external(name: "KakaoSDKNavi")
static let KakaoSDKTemplate: TargetDependency = .external(name: "KakaoSDKTemplate")
static let KakaoAdSDK: TargetDependency = .external(name: "KakaoAdSDK")

// MARK: - Moya
static let Moya: TargetDependency = .external(name: "Moya")
}
Loading

0 comments on commit 1155c29

Please sign in to comment.