From 94e28a324bed6abd2471677fe27dcefc52272c20 Mon Sep 17 00:00:00 2001 From: Javier Cicchelli Date: Fri, 17 Jan 2025 23:17:20 +0100 Subject: [PATCH] Moved the project files from the executable target to the library target. --- .../Resources/Files/.dockerignore | 0 .../Resources/Files/.gitignore | 0 .../Resources/Files/LICENSE | 0 Sources/Library/Resources/Files/Package | 47 +++++++++++++++++++ .../Resources/Files/README} | 0 5 files changed, 47 insertions(+) rename Sources/{Executable => Library}/Resources/Files/.dockerignore (100%) rename Sources/{Executable => Library}/Resources/Files/.gitignore (100%) rename Sources/{Executable => Library}/Resources/Files/LICENSE (100%) create mode 100644 Sources/Library/Resources/Files/Package rename Sources/{Executable/Resources/Files/README.md => Library/Resources/Files/README} (100%) diff --git a/Sources/Executable/Resources/Files/.dockerignore b/Sources/Library/Resources/Files/.dockerignore similarity index 100% rename from Sources/Executable/Resources/Files/.dockerignore rename to Sources/Library/Resources/Files/.dockerignore diff --git a/Sources/Executable/Resources/Files/.gitignore b/Sources/Library/Resources/Files/.gitignore similarity index 100% rename from Sources/Executable/Resources/Files/.gitignore rename to Sources/Library/Resources/Files/.gitignore diff --git a/Sources/Executable/Resources/Files/LICENSE b/Sources/Library/Resources/Files/LICENSE similarity index 100% rename from Sources/Executable/Resources/Files/LICENSE rename to Sources/Library/Resources/Files/LICENSE diff --git a/Sources/Library/Resources/Files/Package b/Sources/Library/Resources/Files/Package new file mode 100644 index 0000000..8043ab3 --- /dev/null +++ b/Sources/Library/Resources/Files/Package @@ -0,0 +1,47 @@ +// swift-tools-version:6.0 + +import PackageDescription + +let package = Package( + name: "{{HB_PACKAGE_NAME}}", + platforms: [ + .macOS(.v10_15) + ], + products: [ + .executable(name: "app", targets: ["App"]), + .library(name: "AppInfrastructure", targets: ["AppInfrastructure"]) + ], + dependencies: [ + .package(url: "https://github.com/hummingbird-project/hummingbird.git", from: "2.0.0"), + .package(url: "https://github.com/apple/swift-argument-parser.git", from: "1.3.0") + ], + targets: [ + .executableTarget( + name: "App", + dependencies: [ + .byName(name: "AppInfrastructure"), + .product(name: "ArgumentParser", package: "swift-argument-parser"), + .product(name: "Hummingbird", package: "hummingbird") + ], + path: "Sources/App" + ), + .target( + name: "AppInfrastructure", + dependencies: [ + .product(name: "ArgumentParser", package: "swift-argument-parser"), + .product(name: "Hummingbird", package: "hummingbird"), + ], + path: "Sources/AppInfrastructure" + ), + .testTarget( + name: "AppTests", + dependencies: [ + dependencies: [ + .byName(name: "AppInfrastructure"), + .product(name: "HummingbirdTesting", package: "hummingbird") + ] + ], + path: "Tests/App" + ) + ] +) diff --git a/Sources/Executable/Resources/Files/README.md b/Sources/Library/Resources/Files/README similarity index 100% rename from Sources/Executable/Resources/Files/README.md rename to Sources/Library/Resources/Files/README