-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathPackage.swift
51 lines (47 loc) · 1.98 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
// swift-tools-version:5.5
import PackageDescription
let package = Package(
name: "LocMapper",
platforms: [
.macOS(.v11),
.iOS(.v14)
],
products: [
.library(name: "LocMapper", targets: ["LocMapper"]),
.executable(name: "locmapper", targets: ["locmapper"])
],
dependencies: [
.package(url: "https://github.com/apple/swift-log.git", from: "1.2.0"),
.package(url: "https://github.com/apple/swift-argument-parser.git", from: "0.3.0"),
.package(url: "https://github.com/happn-app/XibLoc.git", from: "1.0.0"),
.package(url: "https://github.com/xcode-actions/CLTLogger.git", from: "0.5.1")
],
targets: [
.systemLibrary(name: "CZlib", path: "CZlib", providers: [.apt(["zlib1g-dev"])]),
/* A better name would be LocMapperKit. I’m lazy enough not to refactor. */
.target(
name: "LocMapper",
dependencies: [
.product(name: "Logging", package: "swift-log"),
.product(name: "XibLoc", package: "XibLoc"),
.target(name: "CZlib")
],
path: "LocMapper"
),
.testTarget(name: "LocMapperTests", dependencies: ["LocMapper"], exclude: ["Info.plist"]),
.executableTarget(
name: "locmapper",
dependencies: [
.product(name: "ArgumentParser", package: "swift-argument-parser"),
.product(name: "CLTLogger", package: "CLTLogger"),
.target(name: "LocMapper")
],
path: "LocMapper CLI",
exclude: ["locmapper.entitlements"]
)
/* As an alternative to the two targets above, we can have only one “locmapper” target that compile both folders directly.
* I prefer the lib/executable structure (among other it allows having other targets that uses the LocMapper lib, like the test target for instance),
* but here’s the alternative (note it does not work out of the box because the FileHandleOutputStream class is implemented both in the lib and the executable…).
.target(name: "locmapper", dependencies: ["XibLoc", .product(name: "ArgumentParser", package: "swift-argument-parser")], path: ".", sources: ["LocMapper", "LocMapper CLI"])*/
]
)