[Library] Foundation library setup (#3)
This PR contains the work done to define a `Libraries` package that includes its `Foundation` library in it, and integrated the former to the `Feed` framework and `App` targets in the project as well. Reviewed-on: rock-n-code/app-reviews#3 Co-authored-by: Javier Cicchelli <javier@rock-n-code.com> Co-committed-by: Javier Cicchelli <javier@rock-n-code.com>
This commit was merged in pull request #3.
This commit is contained in:
@@ -0,0 +1,54 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Scheme
|
||||
LastUpgradeVersion = "1530"
|
||||
version = "1.7">
|
||||
<BuildAction
|
||||
parallelizeBuildables = "YES"
|
||||
buildImplicitDependencies = "YES"
|
||||
buildArchitectures = "Automatic">
|
||||
</BuildAction>
|
||||
<TestAction
|
||||
buildConfiguration = "Debug"
|
||||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||
shouldUseLaunchSchemeArgsEnv = "YES"
|
||||
shouldAutocreateTestPlan = "YES">
|
||||
<Testables>
|
||||
<TestableReference
|
||||
skipped = "NO">
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "ReviewsFoundationTest"
|
||||
BuildableName = "ReviewsFoundationTest"
|
||||
BlueprintName = "ReviewsFoundationTest"
|
||||
ReferencedContainer = "container:">
|
||||
</BuildableReference>
|
||||
</TestableReference>
|
||||
</Testables>
|
||||
</TestAction>
|
||||
<LaunchAction
|
||||
buildConfiguration = "Debug"
|
||||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||
launchStyle = "0"
|
||||
useCustomWorkingDirectory = "NO"
|
||||
ignoresPersistentStateOnLaunch = "NO"
|
||||
debugDocumentVersioning = "YES"
|
||||
debugServiceExtension = "internal"
|
||||
allowLocationSimulation = "YES">
|
||||
</LaunchAction>
|
||||
<ProfileAction
|
||||
buildConfiguration = "Release"
|
||||
shouldUseLaunchSchemeArgsEnv = "YES"
|
||||
savedToolIdentifier = ""
|
||||
useCustomWorkingDirectory = "NO"
|
||||
debugDocumentVersioning = "YES">
|
||||
</ProfileAction>
|
||||
<AnalyzeAction
|
||||
buildConfiguration = "Debug">
|
||||
</AnalyzeAction>
|
||||
<ArchiveAction
|
||||
buildConfiguration = "Release"
|
||||
revealArchiveInOrganizer = "YES">
|
||||
</ArchiveAction>
|
||||
</Scheme>
|
||||
@@ -0,0 +1,72 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Scheme
|
||||
LastUpgradeVersion = "1530"
|
||||
version = "1.7">
|
||||
<BuildAction
|
||||
parallelizeBuildables = "YES"
|
||||
buildImplicitDependencies = "YES"
|
||||
buildArchitectures = "Automatic">
|
||||
<BuildActionEntries>
|
||||
<BuildActionEntry
|
||||
buildForTesting = "YES"
|
||||
buildForRunning = "YES"
|
||||
buildForProfiling = "YES"
|
||||
buildForArchiving = "YES"
|
||||
buildForAnalyzing = "YES">
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "ReviewsKit"
|
||||
BuildableName = "ReviewsKit"
|
||||
BlueprintName = "ReviewsKit"
|
||||
ReferencedContainer = "container:">
|
||||
</BuildableReference>
|
||||
</BuildActionEntry>
|
||||
</BuildActionEntries>
|
||||
</BuildAction>
|
||||
<TestAction
|
||||
buildConfiguration = "Debug"
|
||||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||
shouldUseLaunchSchemeArgsEnv = "YES">
|
||||
<TestPlans>
|
||||
<TestPlanReference
|
||||
reference = "container:../Libraries.xctestplan"
|
||||
default = "YES">
|
||||
</TestPlanReference>
|
||||
</TestPlans>
|
||||
</TestAction>
|
||||
<LaunchAction
|
||||
buildConfiguration = "Debug"
|
||||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||
launchStyle = "0"
|
||||
useCustomWorkingDirectory = "NO"
|
||||
ignoresPersistentStateOnLaunch = "NO"
|
||||
debugDocumentVersioning = "YES"
|
||||
debugServiceExtension = "internal"
|
||||
allowLocationSimulation = "YES">
|
||||
</LaunchAction>
|
||||
<ProfileAction
|
||||
buildConfiguration = "Release"
|
||||
shouldUseLaunchSchemeArgsEnv = "YES"
|
||||
savedToolIdentifier = ""
|
||||
useCustomWorkingDirectory = "NO"
|
||||
debugDocumentVersioning = "YES">
|
||||
<MacroExpansion>
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "ReviewsKit"
|
||||
BuildableName = "ReviewsKit"
|
||||
BlueprintName = "ReviewsKit"
|
||||
ReferencedContainer = "container:">
|
||||
</BuildableReference>
|
||||
</MacroExpansion>
|
||||
</ProfileAction>
|
||||
<AnalyzeAction
|
||||
buildConfiguration = "Debug">
|
||||
</AnalyzeAction>
|
||||
<ArchiveAction
|
||||
buildConfiguration = "Release"
|
||||
revealArchiveInOrganizer = "YES">
|
||||
</ArchiveAction>
|
||||
</Scheme>
|
||||
@@ -0,0 +1,18 @@
|
||||
//
|
||||
// String+Constants.swift
|
||||
// ReviewsFoundation
|
||||
//
|
||||
// Created by Javier Cicchelli on 16/03/2024.
|
||||
// Copyright © 2024 Röck+Cöde VoF. All rights reserved.
|
||||
//
|
||||
|
||||
import Foundation
|
||||
|
||||
public extension String {
|
||||
|
||||
// MARK: Constants
|
||||
|
||||
/// A representation of an empty string.
|
||||
static let empty: String = ""
|
||||
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
//
|
||||
// String+ConstantsTests.swift
|
||||
// ReviewsFoundationTest
|
||||
//
|
||||
// Created by Javier Cicchelli on 16/03/2024.
|
||||
// Copyright © 2024 Röck+Cöde VoF. All rights reserved.
|
||||
//
|
||||
|
||||
import ReviewsFoundation
|
||||
import XCTest
|
||||
|
||||
final class String_ConstantsTests: XCTestCase {
|
||||
|
||||
// MARK: Properties
|
||||
private var sut: String!
|
||||
|
||||
// MARK: Constants tests
|
||||
func testEmpty() throws {
|
||||
// GIVEN
|
||||
sut = .empty
|
||||
|
||||
// WHEN
|
||||
// THEN
|
||||
XCTAssertTrue(sut.isEmpty)
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,57 @@
|
||||
// swift-tools-version: 5.10
|
||||
|
||||
import PackageDescription
|
||||
|
||||
let package = Package(
|
||||
name: .Package.name,
|
||||
platforms: [
|
||||
.iOS(.v14)
|
||||
],
|
||||
products: [
|
||||
.library(
|
||||
name: .Product.name.kit,
|
||||
targets: [
|
||||
.Target.foundation
|
||||
]
|
||||
),
|
||||
],
|
||||
targets: [
|
||||
.target(
|
||||
name: .Target.foundation,
|
||||
path: "Foundation/Kit"
|
||||
),
|
||||
.testTarget(
|
||||
name: .Target.foundation.test,
|
||||
dependencies: [
|
||||
.byName(name: .Target.foundation)
|
||||
],
|
||||
path: "Foundation/Test"
|
||||
),
|
||||
]
|
||||
)
|
||||
|
||||
// MARK: - String+Constants
|
||||
private extension String {
|
||||
enum Package {
|
||||
static let name = "reviews-kit"
|
||||
}
|
||||
|
||||
enum Product {
|
||||
static let name = "Reviews"
|
||||
}
|
||||
|
||||
enum Target {
|
||||
static let foundation = "\(String.Product.name)Foundation"
|
||||
}
|
||||
}
|
||||
|
||||
// MARK: - String+Computed
|
||||
private extension String {
|
||||
var kit: String {
|
||||
"\(self)Kit"
|
||||
}
|
||||
|
||||
var test: String {
|
||||
"\(self)Test"
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user