[Setup] Basic project structure #1

Merged
javier merged 8 commits from setup/project-structure into main 2023-04-08 18:37:20 +00:00
4 changed files with 47 additions and 0 deletions
Showing only changes of commit 4d4529028b - Show all commits

View File

@ -0,0 +1,28 @@
// swift-tools-version: 5.8
// The swift-tools-version declares the minimum version of Swift required to build this package.
import PackageDescription
let package = Package(
name: "Libraries",
products: [
// Products define the executables and libraries a package produces, and make them visible to other packages.
.library(
name: "Libraries",
targets: ["Libraries"]),
],
dependencies: [
// Dependencies declare other packages that this package depends on.
// .package(url: /* package url */, from: "1.0.0"),
],
targets: [
// Targets are the basic building blocks of a package. A target can define a module or a test suite.
// Targets can depend on other targets in this package, and on products in packages this package depends on.
.target(
name: "Libraries",
dependencies: []),
.testTarget(
name: "LibrariesTests",
dependencies: ["Libraries"]),
]
)

View File

@ -0,0 +1,6 @@
public struct Libraries {
public private(set) var text = "Hello, World!"
public init() {
}
}

View File

@ -0,0 +1,11 @@
import XCTest
@testable import Libraries
final class LibrariesTests: XCTestCase {
func testExample() throws {
// This is an example of a functional test case.
// Use XCTAssert and related functions to verify your tests produce the correct
// results.
XCTAssertEqual(Libraries().text, "Hello, World!")
}
}

View File

@ -121,6 +121,7 @@
46EB332629E1CE05001D5EAF /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
46EB332929E1CE05001D5EAF /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = "<group>"; };
46EB332B29E1CE05001D5EAF /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
46EB333229E1CFD9001D5EAF /* Libraries */ = {isa = PBXFileReference; lastKnownFileType = wrapper; path = Libraries; sourceTree = "<group>"; };
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
@ -182,6 +183,7 @@
46EB331929E1CE04001D5EAF /* Locations */ = {
isa = PBXGroup;
children = (
46EB333229E1CFD9001D5EAF /* Libraries */,
46EB332F29E1CE1E001D5EAF /* Sources */,
46EB333029E1CE27001D5EAF /* Resources */,
);