Skip to content

Commit

Permalink
[Feat] SourceFile+Template 추가 및 수정 DO-SOPT-iOS-Part#18
Browse files Browse the repository at this point in the history
  • Loading branch information
HELLOHIDI committed Jul 1, 2024
1 parent 08ae865 commit 23962ae
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 5 deletions.
10 changes: 5 additions & 5 deletions Tuist/ProjectDescriptionHelpers/Project+Templates.swift
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public extension Project {
deploymentTarget: deploymentTarget,
//infoPlist에 .extendingDefault로 Info.plsit에 추가 내용을 넣어준 이유는 tuist에서 .default 만들어주는 Info.plist는 앱을 실행할 때 화면이 어딘가 나사가 빠진상태로 실행되기 때문입니다.
infoPlist: .extendingDefault(with: infoPlist),
sources: ["Sources/**/*.swift"],
sources: .sources,
// 터미널 명령어랑 비슷한듯? 일단 바쁘니까 나중에 정리해보도록 하자ㅏ https://www.daleseo.com/glob-patterns/#google_vignette
resources: [.glob(pattern: "Resources/**", excluding: [])],
//entitlement: 주로 iOS 애플리케이션에서 특정 기능이나 권한을 활성화하기 위해 사용하는 설정 파일
Expand All @@ -63,7 +63,7 @@ public extension Project {
bundleId: "\(Environment.bundlePrefix).\(name)Interface",
deploymentTarget: deploymentTarget,
infoPlist: .default,
sources: ["Interface/Sources/**/*.swift"],
sources: .interface,
dependencies: internalDependencies,
settings: .settings(base: setting,configurations: XCConfig.framework)
)
Expand All @@ -86,7 +86,7 @@ public extension Project {
bundleId: "\(Environment.bundlePrefix).\(name)",
deploymentTarget: deploymentTarget,
infoPlist: .default,
sources: ["Sources/**/*.swift"],
sources: .sources,
resources: hasResources ? [.glob(pattern: "Resources/**", excluding: [])] : [],
dependencies: deps + internalDependencies + externalDependencies,
settings: .settings(base: settings, configurations: XCConfig.framework)
Expand All @@ -108,7 +108,7 @@ public extension Project {
bundleId: "\(Environment.bundlePrefix).\(name)Demo",
deploymentTarget: deploymentTarget,
infoPlist: .extendingDefault(with: Project.demoInfoPlist),
sources: ["Demo/Sources/**/*.swift"],
sources: .demoSources,
resources: [.glob(pattern: "Demo/Resources/**", excluding: ["Demo/Resources/dummy.txt"])],
dependencies: deps,
settings: .settings(base: setting, configurations: XCConfig.demo)
Expand All @@ -128,7 +128,7 @@ public extension Project {
bundleId: "\(Environment.bundlePrefix).\(name)Tests",
deploymentTarget: deploymentTarget,
infoPlist: .default,
sources: ["Tests/Sources/**/*.swift"],
sources: .unitTests,
resources: [.glob(pattern: "Tests/Resources/**", excluding: [])],
dependencies: deps,
settings: .settings(base: SettingsDictionary().setCodeSignManual(), configurations: XCConfig.tests)
Expand Down
17 changes: 17 additions & 0 deletions Tuist/ProjectDescriptionHelpers/SourceFiles+Template.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
//
// SourceFiles+Template.swift
// ProjectDescriptionHelpers
//
// Created by 류희재 on 7/1/24.
//

import ProjectDescription

public extension SourceFilesList {
static let demoSources: SourceFilesList = "Demo/Sources/**/*.swift"
static let interface: SourceFilesList = "Interface/Sources/**/*.swift"
static let sources: SourceFilesList = "Sources/**/*.swift"
static let testing: SourceFilesList = "Testing/**"
static let unitTests: SourceFilesList = "Tests/Sources/**/*.swift"
static let uiTests: SourceFilesList = "UITests/**"
}

0 comments on commit 23962ae

Please sign in to comment.