Basic package setup (#1)
This PR contains the work done to setup this Swift package, so development can start from here. Reviewed-on: rock-n-code/amiibo-api#1 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 #1.
This commit is contained in:
+23
-11
@@ -1,24 +1,36 @@
|
||||
// swift-tools-version: 6.0
|
||||
// The swift-tools-version declares the minimum version of Swift required to build this package.
|
||||
// swift-tools-version: 5.9
|
||||
|
||||
import PackageDescription
|
||||
|
||||
let package = Package(
|
||||
name: "amiibo-api",
|
||||
name: AmiiboAPI.package,
|
||||
products: [
|
||||
// Products define the executables and libraries a package produces, making them visible to other packages.
|
||||
.library(
|
||||
name: "amiibo-api",
|
||||
targets: ["amiibo-api"]),
|
||||
name: AmiiboAPI.package,
|
||||
targets: [
|
||||
AmiiboAPI.target
|
||||
]
|
||||
)
|
||||
],
|
||||
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.
|
||||
.target(
|
||||
name: "amiibo-api"),
|
||||
name: AmiiboAPI.target,
|
||||
path: "Sources"
|
||||
),
|
||||
.testTarget(
|
||||
name: "amiibo-apiTests",
|
||||
dependencies: ["amiibo-api"]
|
||||
name: AmiiboAPI.test,
|
||||
dependencies: [
|
||||
.byName(name: AmiiboAPI.target)
|
||||
],
|
||||
path: "Tests"
|
||||
),
|
||||
]
|
||||
)
|
||||
|
||||
// MARK: - Constants
|
||||
|
||||
enum AmiiboAPI {
|
||||
static let package = "amiibo-api"
|
||||
static let target = "AmiiboAPI"
|
||||
static let test = "\(AmiiboAPI.target)Tests"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user