-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
…omain [#349] Add the domain and data layers as targets (modules) in the project
- Loading branch information
Showing
28 changed files
with
228 additions
and
42 deletions.
There are no files selected for viewing
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
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.
Empty file.
File renamed without changes.
Empty file.
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,23 @@ | ||
// TODO: Remove this file | ||
|
||
import Nimble | ||
import Quick | ||
|
||
@testable import Domain | ||
|
||
final class DummySpec: QuickSpec { | ||
|
||
override class func spec() { | ||
|
||
describe("A Dummy") { | ||
|
||
context("given a dummy message") { | ||
let message = "Hello" | ||
|
||
it("equals Hello") { | ||
expect(message) == "Hello" | ||
} | ||
} | ||
} | ||
} | ||
} |
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
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,15 @@ | ||
// | ||
// Constant.swift | ||
// ProjectDescriptionHelpers | ||
// | ||
// Created by Phong on 22/10/2023. | ||
// | ||
|
||
public enum Constant { | ||
|
||
static let plistsPath = "Configurations/Plists" | ||
static let modulesRootPath = "Modules" | ||
static let sourcesPath = "Sources" | ||
static let resourcesPath = "Resources" | ||
static let testsPath = "Tests" | ||
} |
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,64 @@ | ||
// | ||
// Modules.swift | ||
// ProjectDescriptionHelpers | ||
// | ||
// Created by Phong on 16/10/2023. | ||
// | ||
|
||
import ProjectDescription | ||
|
||
public enum Module: CaseIterable { | ||
|
||
case domain | ||
case data | ||
|
||
public var name: String { | ||
switch self { | ||
case .domain: | ||
return "Domain" | ||
case .data: | ||
return "Data" | ||
} | ||
} | ||
|
||
public var dependencies: [TargetDependency] { | ||
switch self { | ||
case .domain: | ||
return [] | ||
case .data: | ||
return [.target(name: Module.domain.name)] | ||
} | ||
} | ||
|
||
public var frameworkPath: String { | ||
"\(Constant.modulesRootPath)/\(name)" | ||
} | ||
|
||
public var sources: ProjectDescription.SourceFilesList { | ||
["\(frameworkPath)/\(Constant.sourcesPath)/**"] | ||
} | ||
|
||
public var resources: ProjectDescription.ResourceFileElements { | ||
[] | ||
} | ||
|
||
public var testsSources: ProjectDescription.SourceFilesList { | ||
["\(frameworkPath)/\(Constant.testsPath)/**"] | ||
} | ||
|
||
public var testsResources: ProjectDescription.ResourceFileElements { | ||
[ | ||
"\(frameworkPath)/\(Constant.testsPath)/**/.gitkeep", | ||
"\(frameworkPath)/\(Constant.testsPath)/\(Constant.resourcesPath)/**" | ||
] | ||
} | ||
|
||
|
||
public func getBundleId(mainBundleId: String) -> String { | ||
"\(mainBundleId).\(name)" | ||
} | ||
|
||
public func getTestBundleId(mainBundleId: String) -> String { | ||
"\(mainBundleId).\(name)\(Constant.testsPath)" | ||
} | ||
} |
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
Oops, something went wrong.