-
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.
- Loading branch information
1 parent
6ec4135
commit cd62579
Showing
19 changed files
with
458 additions
and
0 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/Dependencies |
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 @@ | ||
// swift-tools-version: 5.4 | ||
|
||
import PackageDescription | ||
|
||
let package = Package( | ||
name: "MyPlugin", | ||
products: [ | ||
.executable(name: "tuist-my-cli", targets: ["tuist-my-cli"]), | ||
], | ||
targets: [ | ||
.executableTarget( | ||
name: "tuist-my-cli" | ||
), | ||
] | ||
) |
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 plugin = Plugin(name: "MyPlugin") |
9 changes: 9 additions & 0 deletions
9
BeatCounter/Plugins/BeatCounter/ProjectDescriptionHelpers/LocalHelper.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,9 @@ | ||
import Foundation | ||
|
||
public struct LocalHelper { | ||
let name: String | ||
|
||
public init(name: String) { | ||
self.name = name | ||
} | ||
} |
68 changes: 68 additions & 0 deletions
68
BeatCounter/Plugins/BeatCounter/ProjectDescriptionHelpers/Project+Template.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,68 @@ | ||
// | ||
// Project+Template.swift | ||
// MyPlugin | ||
// | ||
// Created by Gordon Choi on 12/10/23. | ||
// | ||
|
||
import ProjectDescription | ||
|
||
public extension Project { | ||
enum Environment { | ||
public static let appName = "BeatCounter" | ||
public static let organizationName = "" // and so on | ||
public static let deploymentTarget = DeploymentTarget.iOS(targetVersion: "17.0", devices: [.iphone, .ipad]) | ||
public static let bundlePrefix = "com." // and so on | ||
// public static let watchDeploymentTarget = DeploymentTarget.watchOS(targetVersion: "10.0") | ||
} | ||
} | ||
|
||
public extension Project { | ||
static func makeAppModule( | ||
name: String = Environment.appName, | ||
bundleId: String, | ||
platform: Platform = .iOS, | ||
product: Product, | ||
organizationName: String = Environment.organizationName, | ||
packages: [Package] = [], | ||
deploymentTarget: DeploymentTarget = Environment.deploymentTarget, | ||
settings: Settings, | ||
dependencies: [TargetDependency] = [], | ||
sources: SourceFilesList = .sources, | ||
resources: ResourceFileElements? = nil, | ||
infoPlist: InfoPlist = .default, | ||
entitlements: Path? = nil, | ||
schemes: [Scheme] = [] | ||
) -> Project { | ||
let appTarget = Target( | ||
name: name, | ||
platform: platform, | ||
product: product, | ||
bundleId: bundleId, | ||
deploymentTarget: deploymentTarget, | ||
infoPlist: infoPlist, | ||
sources: sources, | ||
resources: resources, | ||
entitlements: entitlements, | ||
scripts: [], | ||
dependencies: dependencies | ||
) | ||
|
||
let targets = [appTarget] | ||
|
||
return Project( | ||
name: name, | ||
organizationName: organizationName, | ||
packages: packages, | ||
settings: settings, | ||
targets: targets, | ||
schemes: schemes | ||
) | ||
} | ||
} | ||
|
||
public extension SourceFilesList { | ||
static let sources: SourceFilesList = "Sources/" | ||
} | ||
|
||
|
1 change: 1 addition & 0 deletions
1
BeatCounter/Plugins/BeatCounter/Sources/tuist-my-cli/main.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 @@ | ||
print("Hello, from your Tuist Task") |
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,29 @@ | ||
import ProjectDescription | ||
import ProjectDescriptionHelpers | ||
import MyPlugin | ||
|
||
/* | ||
+-------------+ | ||
| | | ||
| App | Contains BeatCounter App target and BeatCounter unit-test target | ||
| | | ||
+------+-------------+-------+ | ||
| depends on | | ||
| | | ||
+----v-----+ +-----v-----+ | ||
| | | | | ||
| Kit | | UI | Two independent frameworks to share code and start modularising your app | ||
| | | | | ||
+----------+ +-----------+ | ||
|
||
*/ | ||
|
||
// MARK: - Project | ||
|
||
// Local plugin loaded | ||
let localHelper = LocalHelper(name: "MyPlugin") | ||
|
||
// Creates our project using a helper function defined in ProjectDescriptionHelpers | ||
let project = Project.app(name: "BeatCounter", | ||
platform: .iOS, | ||
additionalTargets: ["BeatCounterKit", "BeatCounterUI"]) |
11 changes: 11 additions & 0 deletions
11
BeatCounter/Targets/BeatCounter/Resources/Assets.xcassets/AccentColor.colorset/Contents.json
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 @@ | ||
{ | ||
"colors" : [ | ||
{ | ||
"idiom" : "universal" | ||
} | ||
], | ||
"info" : { | ||
"author" : "xcode", | ||
"version" : 1 | ||
} | ||
} |
98 changes: 98 additions & 0 deletions
98
BeatCounter/Targets/BeatCounter/Resources/Assets.xcassets/AppIcon.appiconset/Contents.json
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,98 @@ | ||
{ | ||
"images" : [ | ||
{ | ||
"idiom" : "iphone", | ||
"scale" : "2x", | ||
"size" : "20x20" | ||
}, | ||
{ | ||
"idiom" : "iphone", | ||
"scale" : "3x", | ||
"size" : "20x20" | ||
}, | ||
{ | ||
"idiom" : "iphone", | ||
"scale" : "2x", | ||
"size" : "29x29" | ||
}, | ||
{ | ||
"idiom" : "iphone", | ||
"scale" : "3x", | ||
"size" : "29x29" | ||
}, | ||
{ | ||
"idiom" : "iphone", | ||
"scale" : "2x", | ||
"size" : "40x40" | ||
}, | ||
{ | ||
"idiom" : "iphone", | ||
"scale" : "3x", | ||
"size" : "40x40" | ||
}, | ||
{ | ||
"idiom" : "iphone", | ||
"scale" : "2x", | ||
"size" : "60x60" | ||
}, | ||
{ | ||
"idiom" : "iphone", | ||
"scale" : "3x", | ||
"size" : "60x60" | ||
}, | ||
{ | ||
"idiom" : "ipad", | ||
"scale" : "1x", | ||
"size" : "20x20" | ||
}, | ||
{ | ||
"idiom" : "ipad", | ||
"scale" : "2x", | ||
"size" : "20x20" | ||
}, | ||
{ | ||
"idiom" : "ipad", | ||
"scale" : "1x", | ||
"size" : "29x29" | ||
}, | ||
{ | ||
"idiom" : "ipad", | ||
"scale" : "2x", | ||
"size" : "29x29" | ||
}, | ||
{ | ||
"idiom" : "ipad", | ||
"scale" : "1x", | ||
"size" : "40x40" | ||
}, | ||
{ | ||
"idiom" : "ipad", | ||
"scale" : "2x", | ||
"size" : "40x40" | ||
}, | ||
{ | ||
"idiom" : "ipad", | ||
"scale" : "1x", | ||
"size" : "76x76" | ||
}, | ||
{ | ||
"idiom" : "ipad", | ||
"scale" : "2x", | ||
"size" : "76x76" | ||
}, | ||
{ | ||
"idiom" : "ipad", | ||
"scale" : "2x", | ||
"size" : "83.5x83.5" | ||
}, | ||
{ | ||
"idiom" : "ios-marketing", | ||
"scale" : "1x", | ||
"size" : "1024x1024" | ||
} | ||
], | ||
"info" : { | ||
"author" : "xcode", | ||
"version" : 1 | ||
} | ||
} |
6 changes: 6 additions & 0 deletions
6
BeatCounter/Targets/BeatCounter/Resources/Assets.xcassets/Contents.json
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,6 @@ | ||
{ | ||
"info" : { | ||
"author" : "xcode", | ||
"version" : 1 | ||
} | ||
} |
6 changes: 6 additions & 0 deletions
6
...unter/Targets/BeatCounter/Resources/Preview Content/Preview Assets.xcassets/Contents.json
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,6 @@ | ||
{ | ||
"info" : { | ||
"author" : "xcode", | ||
"version" : 1 | ||
} | ||
} |
11 changes: 11 additions & 0 deletions
11
BeatCounter/Targets/BeatCounter/Sources/BeatCounterApp.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 SwiftUI | ||
import BeatCounterUI | ||
|
||
@main | ||
struct BeatCounterApp: App { | ||
var body: some Scene { | ||
WindowGroup { | ||
ContentView() | ||
} | ||
} | ||
} |
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,8 @@ | ||
import Foundation | ||
import XCTest | ||
|
||
final class BeatCounterTests: XCTestCase { | ||
func test_twoPlusTwo_isFour() { | ||
XCTAssertEqual(2+2, 4) | ||
} | ||
} |
7 changes: 7 additions & 0 deletions
7
BeatCounter/Targets/BeatCounterKit/Sources/BeatCounterKit.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,7 @@ | ||
import Foundation | ||
|
||
public final class BeatCounterKit { | ||
public static func hello() { | ||
print("Hello, from your Kit framework") | ||
} | ||
} |
8 changes: 8 additions & 0 deletions
8
BeatCounter/Targets/BeatCounterKit/Tests/BeatCounterKitTests.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,8 @@ | ||
import Foundation | ||
import XCTest | ||
|
||
final class BeatCounterKitTests: XCTestCase { | ||
func test_example() { | ||
XCTAssertEqual("BeatCounterKit", "BeatCounterKit") | ||
} | ||
} |
17 changes: 17 additions & 0 deletions
17
BeatCounter/Targets/BeatCounterUI/Sources/ContentView.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,17 @@ | ||
import SwiftUI | ||
|
||
public struct ContentView: View { | ||
public init() {} | ||
|
||
public var body: some View { | ||
Text("Hello, World!") | ||
.padding() | ||
} | ||
} | ||
|
||
|
||
struct ContentView_Previews: PreviewProvider { | ||
static var previews: some View { | ||
ContentView() | ||
} | ||
} |
8 changes: 8 additions & 0 deletions
8
BeatCounter/Targets/BeatCounterUI/Tests/BeatCounterUITests.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,8 @@ | ||
import Foundation | ||
import XCTest | ||
|
||
final class BeatCounterUITests: XCTestCase { | ||
func test_example() { | ||
XCTAssertEqual("BeatCounterUI", "BeatCounterUI") | ||
} | ||
} |
Oops, something went wrong.