Package target setup #1

Merged
javier merged 4 commits from setup/targets into main 2025-01-27 23:38:35 +00:00
5 changed files with 53 additions and 8 deletions

View File

@ -1,14 +1,46 @@
// swift-tools-version: 6.0
// The swift-tools-version declares the minimum version of Swift required to build this package.
import PackageDescription
let package = Package(
name: "Colibri",
products: [
.executable(
name: "colibri",
targets: ["Colibri"]
),
.library(
name: "ColibriLibrary",
targets: ["ColibriLibrary"]
)
],
dependencies: [
.package(
url: "https://github.com/apple/swift-argument-parser",
from: "1.0.0"
)
],
targets: [
// Targets are the basic building blocks of a package, defining a module or a test suite.
// Targets can depend on other targets in this package and products from dependencies.
.executableTarget(
name: "Colibri"),
name: "Colibri",
dependencies: [
.product(
name: "ArgumentParser",
package: "swift-argument-parser"
),
.target(name: "ColibriLibrary")
],
path: "Sources/Executable"
),
.target(
name: "ColibriLibrary",
dependencies: [],
path: "Sources/Library"
),
.testTarget(
name: "ColibriTests",
dependencies: ["ColibriLibrary"],
path: "Tests/Library"
)
]
)

View File

@ -0,0 +1,13 @@
import ArgumentParser
import ColibriLibrary
@main
struct Colibri: AsyncParsableCommand {
// MARK: Functions
func run() async throws {
// ...
}
}

View File

@ -0,0 +1 @@
import Foundation

View File

@ -1,4 +0,0 @@
// The Swift Programming Language
// https://docs.swift.org/swift-book
print("Hello, world!")

View File

@ -0,0 +1,3 @@
import Testing
struct ColibriLibraryTests {}