-
Notifications
You must be signed in to change notification settings - Fork 7
/
Package.swift
42 lines (33 loc) · 1.22 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
// swift-tools-version:4.2
// The swift-tools-version declares the minimum version of Swift required to build this package.
import PackageDescription
let package = Package(
name: "PackageConfig",
products: [
.library(name: "PackageConfig", type: .dynamic, targets: ["PackageConfig"]),
.executable(name: "package-config", targets: ["PackageConfigExecutable"]), // dev
.library(name: "ExampleConfig", type: .dynamic, targets: ["ExampleConfig"]), // dev
.executable(name: "package-config-example", targets: ["ExampleMain"]), // dev
],
dependencies: [
],
targets: [
.target(name: "PackageConfig", dependencies: []),
.target(name: "PackageConfigExecutable", dependencies: []), // dev
.target(name: "ExampleConfig", dependencies: ["PackageConfig"]), // dev
.target(name: "ExampleMain", dependencies: ["PackageConfig", "ExampleConfig"]), // dev
.target(name: "PackageConfigs", dependencies: ["ExampleConfig"]), // dev
]
)
#if canImport(ExampleConfig)
import ExampleConfig
let example = ExampleConfig(value: "example value").write()
#endif
#if canImport(PackageConfig)
import PackageConfig
let config = PackageConfiguration(["example": [
["example1": ""],
"example2",
3
]]).write()
#endif