From 3539965d93b584fa6fea38ee7d5af1ba4145a179 Mon Sep 17 00:00:00 2001 From: junha Date: Tue, 7 Nov 2023 13:34:12 +0900 Subject: [PATCH] =?UTF-8?q?=F0=9F=8E=B1=20::=20#47=20Modul=20=EA=B2=BD?= =?UTF-8?q?=EB=A1=9C=20=EC=9D=B4=EB=8F=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Dependency/Dependency+Modul.swift | 62 +++++++++++++++++++ 1 file changed, 62 insertions(+) create mode 100644 Plugins/UtilityPlugin/ProjectDescriptionHelpers/Dependency/Dependency+Modul.swift diff --git a/Plugins/UtilityPlugin/ProjectDescriptionHelpers/Dependency/Dependency+Modul.swift b/Plugins/UtilityPlugin/ProjectDescriptionHelpers/Dependency/Dependency+Modul.swift new file mode 100644 index 0000000..faa599d --- /dev/null +++ b/Plugins/UtilityPlugin/ProjectDescriptionHelpers/Dependency/Dependency+Modul.swift @@ -0,0 +1,62 @@ +import Foundation +import ProjectDescription + +public extension Monster.DesignSystem { + static let foldername = "DesignSystem" + static func project(name: String) -> Monster { + return .project(target: "\(name)", path: .relativeToRoot("\(foldername)")) + } + + static let Implement = project(name: "DesignSystem") +} + +public extension Monster.Core { + static let folderName = "Core" + static func project(name: String, isInterface: Bool) -> Monster { + let postfix: String = isInterface ? "" : "Impl" + return .project(target: "\(name)\(postfix)", + path: .relativeToRoot("\(folderName)")) + } + + static let CSLogger = project(name: "CSLogger", isInterface: true) + static let DefaultsStore = project(name: "DefaultsStore", isInterface: true) + static let RIBsUtil = project(name: "RIBsUtil", isInterface: true) + static let SuperUI = project(name: "SuperUI", isInterface: true) +} + +public extension Monster.ResourceKit { + static let folderName = "ResourceKit" + static func project(name: String) -> Monster { + return .project(target: "\(name)", + path: .relativeToRoot("\(folderName)")) + } + + static let Implement = project(name: "ResourceKit") +} + +// MARK: - Network +public extension Monster.LKNetwork { + static let folderName = "LKNetwork" + static func project(name: String, isInterface: Bool) -> Monster { + let postfix: String = isInterface ? "" : "Impl" + return .project( + target: "\(name)\(postfix)", + path: .relativeToRoot("LKNetwork") + ) + } + + static let Interface = project(name: "LKNetwork", isInterface: true) + static let Implement = project(name: "LKNetwork", isInterface: false) +} + +public extension Monster.TokenManager { + static let folderName = "TokenManager" + static func project(name: String, isInterface: Bool) -> Monster { + let postfix: String = isInterface ? "" : "Impl" + return .project(target: "\(name)\(postfix)", + path: .relativeToRoot("\(folderName)")) + } + + static let Interface = project(name: "TokenManager", isInterface: true) + static let Implement = project(name: "TokenManager", isInterface: false) +}