Skip to content

Commit

Permalink
tuist setting
Browse files Browse the repository at this point in the history
  • Loading branch information
shwaaaa committed Mar 29, 2024
1 parent 662fae8 commit 7c8a3c0
Show file tree
Hide file tree
Showing 17 changed files with 271 additions and 0 deletions.
68 changes: 68 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
### macOS ###
# General
.DS_Store
.AppleDouble
.LSOverride

# 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
.package.resolved

### Tuist derived files ###
graph.dot
Derived/

### Tuist managed dependencies ###
Tuist/Dependencies
11 changes: 11 additions & 0 deletions App/Project.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import ProjectDescription
import ProjectDescriptionHelpers

let project = Project.executable(
name: "MindWay",
platform: .iOS,
deploymentTarget: .iOS(targetVersion: "15.0", devices: [.iphone]),
dependencies: [
.project(target: "Service", path: "../Service")
]
)
12 changes: 12 additions & 0 deletions App/Support/Info.plist
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<!--
Info.plist
MindWay
Created by 이승화 on 3/29/24.
Copyright (c) 2024 team.mindway. All rights reserved.
-->
<plist version="1.0">
<dict/>
</plist>
8 changes: 8 additions & 0 deletions Service/Project.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import ProjectDescription
import ProjectDescriptionHelpers

let project = Project.dynamicFramwork(
name: "Service",
platform: .iOS,
deploymentTarget: .iOS(targetVersion: "15.0", devices: [.iphone])
)
7 changes: 7 additions & 0 deletions Targets/MindWayKit/Sources/MindWayKit.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import Foundation

public final class MindWayKit {
public static func hello() {
print("Hello, from your Kit framework")
}
}
8 changes: 8 additions & 0 deletions Targets/MindWayKit/Tests/MindWayKitTests.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import Foundation
import XCTest

final class MindWayKitTests: XCTestCase {
func test_example() {
XCTAssertEqual("MindWayKit", "MindWayKit")
}
}
7 changes: 7 additions & 0 deletions Targets/MindWayUI/Sources/MindWayUI.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import Foundation

public final class MindWayUI {
public static func hello() {
print("Hello, from your UI framework")
}
}
8 changes: 8 additions & 0 deletions Targets/MindWayUI/Tests/MindWayUITests.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import Foundation
import XCTest

final class MindWayUITests: XCTestCase {
func test_example() {
XCTAssertEqual("MindWayUI", "MindWayUI")
}
}
12 changes: 12 additions & 0 deletions ThirdPartyLib/Project.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import ProjectDescription
import ProjectDescriptionHelpers

let project = Project.dynamicFramwork(
name: "ThirdPartyLib",
packages: [],
deploymentTarget: .iOS(targetVersion: "15.0", devices: [.iphone]),
dependencies: [
.SPM.Moya,
.SPM.NeedleFoundation
]
)
24 changes: 24 additions & 0 deletions Tuist/Dependencies.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
import ProjectDescription

let dependencies = Dependencies(
carthage: nil,
swiftPackageManager: SwiftPackageManagerDependencies(
[
.remote(
url: "https://github.com/Moya/Moya.git",
requirement: .upToNextMajor(from: "15.0.3")
),
.remote(
url: "https://github.com/uber/needle.git",
requirement: .upToNextMajor(from: "0.24.0")
)
],
baseSettings: .settings(
configurations: [
.debug(name: .debug),
.release(name: .release)
]
)
),
platforms: [.iOS]
)
32 changes: 32 additions & 0 deletions Tuist/ProjectDescriptionHelpers/DynamicFramwork.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
import ProjectDescription

extension Project{
public static func dynamicFramwork(
name: String,
platform: Platform = .iOS,
packages: [Package] = [],
infoPlist: InfoPlist = .default,
deploymentTarget: DeploymentTarget,
dependencies: [TargetDependency] = [
.project(target: "ThirdPartyLib", path: Path("../ThirdPartyLib"))
]
) -> Project {
return Project(
name: name,
packages: packages,
settings: nil,
targets: [
Target(
name: name,
platform: platform,
product: .framework,
bundleId: "\(publicOrganizationName).\(name)",
deploymentTarget: deploymentTarget,
infoPlist: infoPlist,
sources: ["Sources/**"],
dependencies: dependencies
)
]
)
}
}
32 changes: 32 additions & 0 deletions Tuist/ProjectDescriptionHelpers/Executable.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
import ProjectDescription

extension Project {
public static func executable(
name: String,
platform: Platform,
product: Product = .app,
deploymentTarget: DeploymentTarget = .iOS(targetVersion: "15.0", devices: [.iphone]),
dependencies: [TargetDependency]
) -> Project {
return Project(
name: name,
organizationName: publicOrganizationName,
settings: nil,
targets: [
Target(
name: name,
platform: platform,
product: product,
bundleId: "\(publicOrganizationName).\(name)",
deploymentTarget: deploymentTarget,
infoPlist: .file(path: Path("Support/Info.plist")),
sources: ["Sources/**"],
resources: ["Resources/**"],
dependencies: [
.project(target: "ThirdPartyLib", path: Path("../ThirdPartyLib")),
] + dependencies
)
]
)
}
}
3 changes: 3 additions & 0 deletions Tuist/ProjectDescriptionHelpers/OrganizationName.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import ProjectDescription

let publicOrganizationName: String = "team.mindway"
10 changes: 10 additions & 0 deletions Tuist/ProjectDescriptionHelpers/ProjectDeployTarget.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import ProjectDescription

public enum ProjectDeployTarget: String {
case debug = "DEBUG"
case release = "RELEASE"

public var configurationName: ConfigurationName {
ConfigurationName.configuration(self.rawValue)
}
}
5 changes: 5 additions & 0 deletions Tuist/ProjectDescriptionHelpers/Settings.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import ProjectDescription

extension SettingsDictionary {

}
13 changes: 13 additions & 0 deletions Tuist/ProjectDescriptionHelpers/TargetDependency.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import ProjectDescription

extension TargetDependency {
public struct SPM {}
}

public extension TargetDependency.SPM {
static let Moya = TargetDependency.external(name: "Moya")
static let NeedleFoundation = TargetDependency.external(name: "NeedleFoundation")
}

public extension Package {
}
11 changes: 11 additions & 0 deletions Workspace.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import ProjectDescription

let workspace = Workspace(
name: "Mindway",
projects: [
"App",
"Service"
],
fileHeaderTemplate: nil,
additionalFiles: []
)

0 comments on commit 7c8a3c0

Please sign in to comment.