-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2 from ondosee/feature/project-setting
[Feature] :: 프로젝트 세팅
- Loading branch information
Showing
78 changed files
with
1,960 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
### macOS ### | ||
# General | ||
.DS_Store | ||
.AppleDouble | ||
.LSOverride | ||
|
||
# Icon must end with two | ||
Icon | ||
|
||
# Thumbnails | ||
._* | ||
|
||
# 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 | ||
|
||
### Xcode ### | ||
# Xcode | ||
# | ||
# gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore | ||
|
||
## User settings | ||
xcuserdata/ | ||
|
||
## compatibility with Xcode 8 and earlier (ignoring not required starting Xcode 9) | ||
*.xcscmblueprint | ||
*.xccheckout | ||
|
||
## compatibility with Xcode 3 and earlier (ignoring not required starting Xcode 4) | ||
build/ | ||
DerivedData/ | ||
*.moved-aside | ||
*.pbxuser | ||
!default.pbxuser | ||
*.mode1v3 | ||
!default.mode1v3 | ||
*.mode2v3 | ||
!default.mode2v3 | ||
*.perspectivev3 | ||
!default.perspectivev3 | ||
|
||
### Xcode Patch ### | ||
*.xcodeproj/* | ||
!*.xcodeproj/project.pbxproj | ||
!*.xcodeproj/xcshareddata/ | ||
!*.xcworkspace/contents.xcworkspacedata | ||
/*.gcno | ||
|
||
### Projects ### | ||
*.xcodeproj | ||
*.xcworkspace | ||
|
||
### Tuist derived files ### | ||
graph.dot | ||
Derived/ | ||
|
||
### Tuist managed dependencies ### | ||
Tuist/.build |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
[tools] | ||
tuist = "4.23.0" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
generate: | ||
tuist install | ||
tuist generate | ||
|
||
ci_generate: | ||
tuist install | ||
TUIST_ENV=CI tuist generate | ||
|
||
cd_generate: | ||
tuist install | ||
TUIST_ENV=CD tuist generate | ||
|
||
clean: | ||
rm -rf **/*.xcodeproj | ||
rm -rf *.xcworkspace | ||
|
||
reset: | ||
tuist clean | ||
rm -rf **/*.xcodeproj | ||
rm -rf *.xcworkspace |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
import ProjectDescription | ||
|
||
let configurationPlugin = Plugin(name: "ConfigurationPlugin") |
15 changes: 15 additions & 0 deletions
15
Plugin/ConfigurationPlugin/ProjectDescriptionHelpers/Configuration+Ext.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import ProjectDescription | ||
|
||
public extension ConfigurationName { | ||
static var dev: ConfigurationName { configuration(ProjectDeployTarget.dev.rawValue) } | ||
static var stage: ConfigurationName { configuration(ProjectDeployTarget.stage.rawValue) } | ||
static var prod: ConfigurationName { configuration(ProjectDeployTarget.prod.rawValue) } | ||
} | ||
|
||
public extension Array where Element == Configuration { | ||
static let `default`: [Configuration] = [ | ||
.debug(name: .dev, xcconfig: .shared), | ||
.debug(name: .stage, xcconfig: .shared), | ||
.release(name: .prod, xcconfig: .shared) | ||
] | ||
} |
10 changes: 10 additions & 0 deletions
10
Plugin/ConfigurationPlugin/ProjectDescriptionHelpers/Path+XCConfig.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import ProjectDescription | ||
|
||
public extension ProjectDescription.Path { | ||
static func relativeToXCConfig(type: ProjectDeployTarget, name: String) -> Self { | ||
return .relativeToRoot("XCConfig/\(name)/\(type.rawValue).xcconfig") | ||
} | ||
static var shared: Self { | ||
return .relativeToRoot("XCConfig/Shared.xcconfig") | ||
} | ||
} |
12 changes: 12 additions & 0 deletions
12
Plugin/ConfigurationPlugin/ProjectDescriptionHelpers/ProjectDeployTarget.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import Foundation | ||
import ProjectDescription | ||
|
||
public enum ProjectDeployTarget: String { | ||
case dev = "DEV" | ||
case stage = "STAGE" | ||
case prod = "PROD" | ||
|
||
public var configurationName: ConfigurationName { | ||
ConfigurationName.configuration(self.rawValue) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
import ProjectDescription | ||
|
||
let dependencyPlugin = Plugin(name: "DependencyPlugin") |
11 changes: 11 additions & 0 deletions
11
Plugin/DependencyPlugin/ProjectDescriptionHelpers/Dependency+SPM.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import ProjectDescription | ||
|
||
public extension TargetDependency { | ||
struct SPM {} | ||
} | ||
|
||
public extension TargetDependency.SPM { | ||
} | ||
|
||
public extension Package { | ||
} |
74 changes: 74 additions & 0 deletions
74
Plugin/DependencyPlugin/ProjectDescriptionHelpers/ModulePaths.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
import Foundation | ||
|
||
public enum ModulePaths { | ||
case feature(Feature) | ||
case domain(Domain) | ||
case core(Core) | ||
case shared(Shared) | ||
case userInterface(UserInterface) | ||
} | ||
|
||
extension ModulePaths: ModularTargetPathConvertable { | ||
public func targetName(type: ModularTargetType) -> String { | ||
switch self { | ||
case let .feature(module as any ModularTargetPathConvertable), | ||
let .domain(module as any ModularTargetPathConvertable), | ||
let .core(module as any ModularTargetPathConvertable), | ||
let .shared(module as any ModularTargetPathConvertable), | ||
let .userInterface(module as any ModularTargetPathConvertable): | ||
return module.targetName(type: type) | ||
} | ||
} | ||
} | ||
|
||
public extension ModulePaths { | ||
enum Feature: String, ModularTargetPathConvertable { | ||
case BaseFeature | ||
} | ||
} | ||
|
||
public extension ModulePaths { | ||
enum Domain: String, ModularTargetPathConvertable { | ||
case BaseDomain | ||
} | ||
} | ||
|
||
public extension ModulePaths { | ||
enum Core: String, ModularTargetPathConvertable { | ||
case Networking | ||
} | ||
} | ||
|
||
public extension ModulePaths { | ||
enum Shared: String, ModularTargetPathConvertable { | ||
case GlobalThirdPartyLibrary | ||
} | ||
} | ||
|
||
public extension ModulePaths { | ||
enum UserInterface: String, ModularTargetPathConvertable { | ||
case DesignSystem | ||
} | ||
} | ||
|
||
public enum ModularTargetType: String { | ||
case interface = "Interface" | ||
case sources = "" | ||
case testing = "Testing" | ||
case unitTest = "Tests" | ||
case example = "Example" | ||
} | ||
|
||
public protocol ModularTargetPathConvertable { | ||
func targetName(type: ModularTargetType) -> String | ||
} | ||
|
||
public extension ModularTargetPathConvertable where Self: RawRepresentable { | ||
func targetName(type: ModularTargetType) -> String { | ||
"\(self.rawValue)\(type.rawValue)" | ||
} | ||
} | ||
|
||
// MARK: - For DI | ||
extension ModulePaths.Feature: CaseIterable {} | ||
extension ModulePaths.Domain: CaseIterable {} |
43 changes: 43 additions & 0 deletions
43
Plugin/DependencyPlugin/ProjectDescriptionHelpers/PathExtension.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
import ProjectDescription | ||
|
||
public extension ProjectDescription.Path { | ||
static func relativeToSections(_ path: String) -> Self { | ||
return .relativeToRoot("Projects/\(path)") | ||
} | ||
static func relativeToFeature(_ path: String) -> Self { | ||
return .relativeToRoot("Projects/Feature/\(path)") | ||
} | ||
static func relativeToDomain(_ path: String) -> Self { | ||
return .relativeToRoot("Projects/Domain/\(path)") | ||
} | ||
static func relativeToCore(_ path: String) -> Self { | ||
return .relativeToRoot("Projects/Core/\(path)") | ||
} | ||
static func relativeToShared(_ path: String) -> Self { | ||
return .relativeToRoot("Projects/Shared/\(path)") | ||
} | ||
static func relativeToUserInterface(_ path: String) -> Self { | ||
return .relativeToRoot("Projects/UserInterface/\(path)") | ||
} | ||
static var app: Self { | ||
return .relativeToRoot("Projects/App") | ||
} | ||
} | ||
|
||
public extension TargetDependency { | ||
static func feature(name: String) -> Self { | ||
return .project(target: name, path: .relativeToFeature(name)) | ||
} | ||
static func domain(name: String) -> Self { | ||
return .project(target: name, path: .relativeToDomain(name)) | ||
} | ||
static func core(name: String) -> Self { | ||
return .project(target: name, path: .relativeToCore(name)) | ||
} | ||
static func shated(name: String) -> Self { | ||
return .project(target: name, path: .relativeToShared(name)) | ||
} | ||
static func userInterface(name: String) -> Self { | ||
return .project(target: name, path: .relativeToUserInterface(name)) | ||
} | ||
} |
54 changes: 54 additions & 0 deletions
54
Plugin/DependencyPlugin/ProjectDescriptionHelpers/TargetDependency+ModularTarget.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
import Foundation | ||
import ProjectDescription | ||
|
||
public extension TargetDependency { | ||
static func feature( | ||
target: ModulePaths.Feature, | ||
type: ModularTargetType = .sources | ||
) -> TargetDependency { | ||
.project( | ||
target: target.targetName(type: type), | ||
path: .relativeToFeature(target.rawValue) | ||
) | ||
} | ||
|
||
static func domain( | ||
target: ModulePaths.Domain, | ||
type: ModularTargetType = .sources | ||
) -> TargetDependency { | ||
.project( | ||
target: target.targetName(type: type), | ||
path: .relativeToDomain(target.rawValue) | ||
) | ||
} | ||
|
||
static func core( | ||
target: ModulePaths.Core, | ||
type: ModularTargetType = .sources | ||
) -> TargetDependency { | ||
.project( | ||
target: target.targetName(type: type), | ||
path: .relativeToCore(target.rawValue) | ||
) | ||
} | ||
|
||
static func shared( | ||
target: ModulePaths.Shared, | ||
type: ModularTargetType = .sources | ||
) -> TargetDependency { | ||
.project( | ||
target: target.targetName(type: type), | ||
path: .relativeToShared(target.rawValue) | ||
) | ||
} | ||
|
||
static func userInterface( | ||
target: ModulePaths.UserInterface, | ||
type: ModularTargetType = .sources | ||
) -> TargetDependency { | ||
.project( | ||
target: target.targetName(type: type), | ||
path: .relativeToUserInterface(target.rawValue) | ||
) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
import ProjectDescription | ||
|
||
let environmentPlugin = Plugin(name: "EnvironmentPlugin") |
18 changes: 18 additions & 0 deletions
18
Plugin/EnvironmentPlugin/ProjectDescriptionHelpers/ProjectEnvironment.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
import Foundation | ||
import ProjectDescription | ||
|
||
public struct ProjectEnvironment { | ||
public let name: String | ||
public let organizationName: String | ||
public let destinations: Destinations | ||
public let deploymentTargets: DeploymentTargets | ||
public let baseSetting: SettingsDictionary | ||
} | ||
|
||
public let env = ProjectEnvironment( | ||
name: "ondosee", | ||
organizationName: "com", | ||
destinations: [.iPhone, .appleWatch], | ||
deploymentTargets: .multiplatform(iOS: "16.0", watchOS: "9.0"), | ||
baseSetting: [:] | ||
) |
Oops, something went wrong.