Fixed the package resource file in the library target.

This commit is contained in:
Javier Cicchelli 2025-01-18 04:46:59 +01:00
parent 4d55fadfb8
commit 504b3be447

View File

@ -3,13 +3,13 @@
import PackageDescription import PackageDescription
let package = Package( let package = Package(
name: "{{HB_PACKAGE_NAME}}", name: "App",
platforms: [ platforms: [
.macOS(.v10_15) .macOS(.v10_15)
], ],
products: [ products: [
.executable(name: "app", targets: ["App"]), .executable(name: "app", targets: ["App"]),
.library(name: "AppInfrastructure", targets: ["AppInfrastructure"]) .library(name: "AppLibrary", targets: ["AppLibrary"])
], ],
dependencies: [ dependencies: [
.package(url: "https://github.com/hummingbird-project/hummingbird.git", from: "2.0.0"), .package(url: "https://github.com/hummingbird-project/hummingbird.git", from: "2.0.0"),
@ -19,29 +19,27 @@ let package = Package(
.executableTarget( .executableTarget(
name: "App", name: "App",
dependencies: [ dependencies: [
.byName(name: "AppInfrastructure"), .product(name: "ArgumentParser", package: "swift-argument-parser"),
.product(name: "Hummingbird", package: "hummingbird"),
.target(name: "AppLibrary")
],
path: "App"
),
.target(
name: "AppLibrary",
dependencies: [
.product(name: "ArgumentParser", package: "swift-argument-parser"), .product(name: "ArgumentParser", package: "swift-argument-parser"),
.product(name: "Hummingbird", package: "hummingbird") .product(name: "Hummingbird", package: "hummingbird")
], ],
path: "Sources/App" path: "Library"
),
.target(
name: "AppInfrastructure",
dependencies: [
.product(name: "ArgumentParser", package: "swift-argument-parser"),
.product(name: "Hummingbird", package: "hummingbird"),
],
path: "Sources/AppInfrastructure"
), ),
.testTarget( .testTarget(
name: "AppTests", name: "AppTests",
dependencies: [ dependencies: [
dependencies: [ .product(name: "HummingbirdTesting", package: "hummingbird"),
.byName(name: "AppInfrastructure"), .target(name: "AppLibrary")
.product(name: "HummingbirdTesting", package: "hummingbird")
]
], ],
path: "Tests/App" path: "Test"
) )
] ]
) )