-
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 #130 from adessoTurkey/feature/SASU0127-TuistMigra…
…tion [SASU-0127] - Tuist Migration #129
- Loading branch information
Showing
175 changed files
with
405 additions
and
98 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 |
---|---|---|
|
@@ -20,15 +20,14 @@ jobs: | |
xcode-version: latest-stable | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
- name: Xcodegen | ||
uses: xavierLowmiller/xcodegen-action@1.1.2 | ||
- name: tuist Fetch | ||
uses: tuist/tuist-action@0.13.0 | ||
with: | ||
spec: project.yml | ||
quiet: true | ||
version: 'latest' | ||
- name: Generate Project | ||
run: | | ||
xcodegen generate | ||
command: 'fetch' | ||
- name: tuist Generate | ||
uses: tuist/[email protected] | ||
with: | ||
command: 'generate' | ||
- name: Build | ||
run: | | ||
xcodebuild -scheme SampleAppSwiftUI clean build -sdk iphoneos -configuration Development CODE_SIGNING_ALLOWED=No -destination 'generic/platform=iOS Simulator' CONFIGURATION_BUILD_DIR=$PWD/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
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,32 @@ | ||
{ | ||
"pins" : [ | ||
{ | ||
"identity" : "cocoalumberjack", | ||
"kind" : "remoteSourceControl", | ||
"location" : "https://github.com/CocoaLumberjack/CocoaLumberjack", | ||
"state" : { | ||
"revision" : "363ed23d19a931809ea834a7d722da830353806a", | ||
"version" : "3.8.2" | ||
} | ||
}, | ||
{ | ||
"identity" : "pulse", | ||
"kind" : "remoteSourceControl", | ||
"location" : "https://github.com/kean/Pulse", | ||
"state" : { | ||
"revision" : "e8bc65bd43d1f32aef533e723f2d324830431120", | ||
"version" : "3.7.3" | ||
} | ||
}, | ||
{ | ||
"identity" : "swift-log", | ||
"kind" : "remoteSourceControl", | ||
"location" : "https://github.com/apple/swift-log.git", | ||
"state" : { | ||
"revision" : "532d8b529501fb73a2455b179e0bbb6d49b652ed", | ||
"version" : "1.5.3" | ||
} | ||
} | ||
], | ||
"version" : 2 | ||
} |
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.35.2 |
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,26 @@ | ||
import ProjectDescription | ||
import ProjectDescriptionHelpers | ||
|
||
let project = Project.createAppProject( | ||
name: "SampleAppSwiftUI", | ||
projectPackages: [ | ||
Package.remote(url: "https://github.com/CocoaLumberjack/CocoaLumberjack", requirement: .upToNextMajor(from: "3.8.0")), | ||
Package.remote(url: "https://github.com/kean/Pulse", requirement: .upToNextMajor(from: "3.0.0")), | ||
Package.remote(url: "https://github.com/apple/swift-log.git", requirement: .upToNextMajor(from: "1.5.2")) | ||
], | ||
projectSettings: .projectSettings, | ||
destinations: [.iPhone, .iPad, .macWithiPadDesign], | ||
deploymentTargets: .iOS("16.0"), | ||
appTargetScripts: [ | ||
.pre(path: .relativeToRoot("scripts/installation/swiftlint.sh"), name: "SwiftLint", basedOnDependencyAnalysis: false) | ||
], | ||
appTargetSettings: .targetSettings, | ||
dependencies: [ | ||
.package(product: "CocoaLumberjack"), | ||
.package(product: "CocoaLumberjackSwift"), | ||
.package(product: "CocoaLumberjackSwiftLogBackend"), | ||
.package(product: "PulseUI") | ||
], | ||
hasUnitTestTarget: true, | ||
hasUITestTarget: true | ||
) |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
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
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
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
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
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
File renamed without changes.
File renamed without changes.
File renamed without changes.
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
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,13 @@ | ||
// swift-tools-version: 5.9 | ||
|
||
import ProjectDescription | ||
import ProjectDescriptionHelpers | ||
|
||
let dependencies = Dependencies( | ||
swiftPackageManager: .init( | ||
projectOptions: [ | ||
"LocalSwiftPackage": .options(disableSynthesizedResourceAccessors: false), | ||
] | ||
), | ||
platforms: [.iOS] | ||
) |
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 @@ | ||
// swift-tools-version: 5.9 | ||
|
||
import PackageDescription | ||
|
||
let package = Package( | ||
name: "PackageName", | ||
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,42 @@ | ||
import Foundation | ||
import ProjectDescription | ||
|
||
public enum BuildEnvironment: String, CaseIterable { | ||
case appStore, development, production | ||
|
||
public var name: String { rawValue.firstUppercased } | ||
|
||
public var configurationName: ConfigurationName { | ||
ConfigurationName(stringLiteral: name) | ||
} | ||
|
||
public var targetConfigPath: Path { | ||
.relativeToRoot("Projects/SampleAppSwiftUI/SampleAppSwiftUI/Configs/\(name).xcconfig") | ||
} | ||
|
||
public var targetConfiguration: Configuration { | ||
switch self { | ||
case .appStore: | ||
return .release(name: configurationName, xcconfig: targetConfigPath) | ||
case .development: | ||
return .debug(name: configurationName, xcconfig: targetConfigPath) | ||
case .production: | ||
return .debug(name: configurationName, xcconfig: targetConfigPath) | ||
} | ||
} | ||
|
||
public var projectConfiguration: Configuration { | ||
switch self { | ||
case .appStore: | ||
return .release(name: configurationName) | ||
case .development: | ||
return .debug(name: configurationName) | ||
case .production: | ||
return .debug(name: configurationName) | ||
} | ||
} | ||
} | ||
|
||
extension StringProtocol { | ||
public var firstUppercased: String { prefix(1).uppercased() + dropFirst() } | ||
} |
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,92 @@ | ||
import Foundation | ||
import ProjectDescription | ||
|
||
extension Project { | ||
|
||
static func generateBundleId(for target: String) -> String { | ||
"com.adesso.\(target)" | ||
} | ||
|
||
public static func createAppProject( | ||
name: String, | ||
projectPackages: [Package] = [], | ||
projectSettings: Settings?, | ||
destinations: Destinations, | ||
deploymentTargets: DeploymentTargets?, | ||
appTargetScripts: [TargetScript] = [], | ||
appTargetSettings: Settings?, | ||
dependencies: [TargetDependency] = [], | ||
hasUnitTestTarget: Bool, | ||
hasUITestTarget: Bool | ||
) -> Project { | ||
var targets: [Target] = [] | ||
|
||
let appTarget = Target( | ||
name: name, | ||
destinations: destinations, | ||
product: .app, | ||
productName: name, | ||
bundleId: "$(PRODUCT_BUNDLE_IDENTIFIER)", | ||
deploymentTargets: deploymentTargets, | ||
infoPlist: .file(path: .relativeToRoot("Projects/\(name)/\(name)/Info.plist")), | ||
sources: SourceFilesList.paths([.relativeToRoot("Projects/\(name)/\(name)/**")]), | ||
resources: ResourceFileElements( | ||
resources: [ | ||
ResourceFileElement.glob(pattern: .relativeToRoot("Projects/\(name)/\(name)/Resources/**")) | ||
] | ||
), | ||
scripts: appTargetScripts, | ||
dependencies: dependencies, | ||
settings: appTargetSettings | ||
) | ||
|
||
targets.append(appTarget) | ||
|
||
if hasUnitTestTarget { | ||
let unitTestTargetName = "\(name)Tests" | ||
let unitTestTarget = Target( | ||
name: unitTestTargetName, | ||
destinations: destinations, | ||
product: .unitTests, | ||
productName: unitTestTargetName, | ||
bundleId: generateBundleId(for: unitTestTargetName), | ||
deploymentTargets: deploymentTargets, | ||
infoPlist: .file(path: .relativeToRoot("Projects/\(name)/\(unitTestTargetName)/Info.plist")), | ||
sources: SourceFilesList.paths([.relativeToRoot("Projects/\(name)/\(unitTestTargetName)/**")]), | ||
dependencies: dependencies | ||
) | ||
|
||
targets.append(unitTestTarget) | ||
} | ||
|
||
if hasUITestTarget { | ||
let uiTestTargetName = "\(name)UITests" | ||
let uiTestTarget = Target( | ||
name: uiTestTargetName, | ||
destinations: destinations, | ||
product: .uiTests, | ||
productName: uiTestTargetName, | ||
bundleId: generateBundleId(for: uiTestTargetName), | ||
deploymentTargets: deploymentTargets, | ||
infoPlist: .file(path: .relativeToRoot("Projects/\(name)/\(uiTestTargetName)/Info.plist")), | ||
sources: SourceFilesList.paths([.relativeToRoot("Projects/\(name)/\(uiTestTargetName)/**")]) | ||
) | ||
|
||
targets.append(uiTestTarget) | ||
} | ||
|
||
return Project( | ||
name: name, | ||
options: .options( | ||
automaticSchemesOptions: .disabled, | ||
disableBundleAccessors: true, | ||
disableSynthesizedResourceAccessors: true | ||
), | ||
packages: projectPackages, | ||
settings: projectSettings, | ||
targets: targets, | ||
schemes: [Scheme.createScheme(for: name, executable: name, hasUnitTestTarget: hasUnitTestTarget, hasUITestTarget: hasUITestTarget)] | ||
// schemes: Scheme.allSchemes(for: name, hasUnitTestTarget: hasUnitTestTarget, hasUITestTarget: hasUITestTarget) // MARK: If you want to create separate scheme for all BuildEnvironment use this method | ||
) | ||
} | ||
} |
Oops, something went wrong.