-
Notifications
You must be signed in to change notification settings - Fork 10
/
Package.swift
41 lines (38 loc) · 1.26 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
// swift-tools-version:5.6
import PackageDescription
let pkgName = "gir2swift"
let libTarget = "lib\(pkgName)"
let plugin = "\(pkgName)-plugin"
let package = Package(
name: pkgName,
products: [
.executable(name: pkgName, targets: [pkgName]),
.library(name: libTarget, targets: [libTarget]),
.plugin(name: plugin, targets: [plugin]),
],
dependencies: [
.package(url: "https://github.com/jpsim/Yams.git", from: "4.0.6"),
.package(url: "https://github.com/rhx/SwiftLibXML.git", branch: "main"),
.package(url: "https://github.com/apple/swift-argument-parser", from: "1.1.1")
],
targets: [
.executableTarget(
name: pkgName,
dependencies: [
.init(stringLiteral: libTarget)
]
),
.target(
name: libTarget,
dependencies: [
"SwiftLibXML",
.product(name: "ArgumentParser", package: "swift-argument-parser"),
"Yams"
]
),
.testTarget(name: "\(pkgName)Tests", dependencies: [.init(stringLiteral: libTarget)]),
.plugin(name: plugin,
capability: .buildTool(),
dependencies: [.init(stringLiteral: pkgName)]),
]
)