-
Notifications
You must be signed in to change notification settings - Fork 2
/
Package.swift
61 lines (58 loc) · 3.76 KB
/
Package.swift
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
// swift-tools-version:5.10
// The swift-tools-version declares the minimum version of Swift required to build this package.
import PackageDescription
let package = Package(name: "sma2mqtt",
platforms: [
.macOS(.v13),
// .iOS(.v13),
// .tvOS(.v13),
// .watchOS(.v6)
],
products: [
.executable(name: "sma2mqtt", targets: ["sma2mqtt"]),
.library(name: "sma2mqttLibrary", targets: ["sma2mqttLibrary"]),
],
dependencies: [
.package(url: "https://github.com/nicklockwood/SwiftFormat", .upToNextMajor(from: "0.51.12")),
.package(url: "https://github.com/apple/swift-argument-parser", .upToNextMajor(from: "1.2.2")),
.package(url: "https://github.com/swift-server/async-http-client.git", from: "1.18.0"),
.package(url: "https://github.com/swift-server-community/mqtt-nio", .upToNextMajor(from: "2.8.0")),
.package(url: "https://github.com/jollyjinx/BinaryCoder", .upToNextMajor(from: "2.3.1")),
.package(url: "https://github.com/jollyjinx/JLog", .upToNextMajor(from: "0.0.5")),
],
targets: [
.executableTarget(name: "sma2mqtt",
dependencies: [
"sma2mqttLibrary",
.product(name: "ArgumentParser", package: "swift-argument-parser"),
.product(name: "JLog", package: "JLog"),
],
swiftSettings: [
.enableExperimentalFeature("StrictConcurrency"),
]),
.target(name: "sma2mqttLibrary",
dependencies: [
"CNative",
.product(name: "BinaryCoder", package: "BinaryCoder"),
.product(name: "AsyncHTTPClient", package: "async-http-client"),
.product(name: "MQTTNIO", package: "mqtt-nio"),
.product(name: "JLog", package: "JLog"),
],
resources: [
.copy("Obis/Resources/obisdefinition.json"),
.copy("DataObjects/Resources/sma.data.objectMetaData.json"),
.copy("DataObjects/Resources/sma.data.Translation_Names.json"),
.copy("SMAPacket/Resources/SMANetPacketDefinitions.json"),
],
swiftSettings: [
.enableExperimentalFeature("StrictConcurrency"),
]),
.target(name: "CNative",
dependencies: []),
.testTarget(name: "sma2mqttTests",
dependencies: [
"sma2mqttLibrary",
.product(name: "BinaryCoder", package: "BinaryCoder"),
.product(name: "JLog", package: "JLog"),
]),
])