diff --git a/Tuist/ProjectDescriptionHelpers/Project+Templates.swift b/Tuist/ProjectDescriptionHelpers/Project+Templates.swift index 9783782..bd0ba8c 100644 --- a/Tuist/ProjectDescriptionHelpers/Project+Templates.swift +++ b/Tuist/ProjectDescriptionHelpers/Project+Templates.swift @@ -2,7 +2,21 @@ import ProjectDescription import ConfigPlugin import EnvPlugin + public extension Project { + /// Sumarry: 모듈을 만드는 함수 + /// + /// Discussion/Overview + /// + /// - Parameters: + /// - [param]: [description] + /// - Returns: [description] + /// - Warning: [description] + /// - Author: [name] + /// - Version: [version number] + /// - Note: [note message] + /// - Tip: [tip message] + /// - Todo: [todo message] static func makeModule( name: String, targets: Set = Set([.staticFramework, .unitTest, .demo]), @@ -160,61 +174,6 @@ public extension Project { } } -extension Scheme { - /// Scheme 생성하는 method - - static func makeScheme(configs: ConfigurationName, name: String) -> Scheme { // 일반앱 - return Scheme( - name: name, - shared: true, - buildAction: .buildAction(targets: ["\(name)"]), - testAction: .targets( - ["\(name)Tests"], - configuration: configs, - options: .options(coverage: true, codeCoverageTargets: ["\(name)"]) - ), - runAction: .runAction(configuration: configs), - archiveAction: .archiveAction(configuration: configs), - profileAction: .profileAction(configuration: configs), - analyzeAction: .analyzeAction(configuration: configs) - ) - } - - static func makeDemoScheme(configs: ConfigurationName, name: String) -> Scheme { // 데모앱 - return Scheme( - name: "\(name)Demo", - shared: true, - buildAction: .buildAction(targets: ["\(name)Demo"]), - testAction: .targets( - ["\(name)Tests"], - configuration: configs, - options: .options(coverage: true, codeCoverageTargets: ["\(name)Demo"]) - ), - runAction: .runAction(configuration: configs), - archiveAction: .archiveAction(configuration: configs), - profileAction: .profileAction(configuration: configs), - analyzeAction: .analyzeAction(configuration: configs) - ) - } - - static func makeDemoAppTestScheme() -> Scheme { // 데모테스트앱 - let targetName = "\(Environment.workspaceName)-Demo" - return Scheme( - name: "\(targetName)-Test", - shared: true, - buildAction: .buildAction(targets: ["\(targetName)"]), - testAction: .targets( - ["\(targetName)Tests"], - configuration: "Test", - options: .options(coverage: true, codeCoverageTargets: ["\(targetName)"]) - ), - runAction: .runAction(configuration: "Test"), - archiveAction: .archiveAction(configuration: "Test"), - profileAction: .profileAction(configuration: "Test"), - analyzeAction: .analyzeAction(configuration: "Test") - ) - } -} extension Project { static let appSchemes: [Scheme] = [ diff --git a/Tuist/ProjectDescriptionHelpers/Scheme+Template.swift b/Tuist/ProjectDescriptionHelpers/Scheme+Template.swift new file mode 100644 index 0000000..90a2237 --- /dev/null +++ b/Tuist/ProjectDescriptionHelpers/Scheme+Template.swift @@ -0,0 +1,67 @@ +// +// Scheme+Template.swift +// ProjectDescriptionHelpers +// +// Created by 류희재 on 7/1/24. +// + +import ProjectDescription +import EnvPlugin + +extension Scheme { + /// Scheme 생성하는 method + + static func makeScheme(configs: ConfigurationName, name: String) -> Scheme { // 일반앱 + return Scheme( + name: name, + shared: true, + buildAction: .buildAction(targets: ["\(name)"]), + testAction: .targets( + ["\(name)Tests"], + configuration: configs, + options: .options(coverage: true, codeCoverageTargets: ["\(name)"]) + ), + runAction: .runAction(configuration: configs), + archiveAction: .archiveAction(configuration: configs), + profileAction: .profileAction(configuration: configs), + analyzeAction: .analyzeAction(configuration: configs) + ) + } + + static func makeDemoScheme(configs: ConfigurationName, name: String) -> Scheme { // 데모앱 + return Scheme( + name: "\(name)Demo", + shared: true, + buildAction: .buildAction(targets: ["\(name)Demo"]), + testAction: .targets( + ["\(name)Tests"], + configuration: configs, + options: .options(coverage: true, codeCoverageTargets: ["\(name)Demo"]) + ), + runAction: .runAction(configuration: configs), + archiveAction: .archiveAction(configuration: configs), + profileAction: .profileAction(configuration: configs), + analyzeAction: .analyzeAction(configuration: configs) + ) + } + + static func makeDemoAppTestScheme() -> Scheme { // 데모테스트앱 + let targetName = "\(Environment.workspaceName)-Demo" + return Scheme( + name: "\(targetName)-Test", + shared: true, + buildAction: .buildAction(targets: ["\(targetName)"]), + testAction: .targets( + ["\(targetName)Tests"], + configuration: "Test", + options: .options(coverage: true, codeCoverageTargets: ["\(targetName)"]) + ), + runAction: .runAction(configuration: "Test"), + archiveAction: .archiveAction(configuration: "Test"), + profileAction: .profileAction(configuration: "Test"), + analyzeAction: .analyzeAction(configuration: "Test") + ) + } +} + +