-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathPackage.swift
118 lines (115 loc) · 4.67 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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
// swift-tools-version: 5.6
// The swift-tools-version declares the minimum version of Swift required to build this package.
import PackageDescription
let package = Package(
name: "TezosSwiftSDK",
platforms: [
.macOS(.v10_15),
.iOS(.v13),
],
products: [
// Products define the executables and libraries a package produces, and make them visible to other packages.
.library(name: "TezosCore", targets: ["TezosCore"]),
.library(name: "TezosMichelson", targets: ["TezosMichelson"]),
.library(name: "TezosOperation", targets: ["TezosOperation"]),
.library(name: "TezosRPC", targets: ["TezosRPC"]),
.library(name: "TezosContract", targets: ["TezosContract"]),
.library(name: "TezosCryptoDefault", targets: ["TezosCryptoDefault"])
],
dependencies: [
// Dependencies declare other packages that this package depends on.
// .package(url: /* package url */, from: "1.0.0"),
.package(url: "https://github.com/apple/swift-collections.git", .upToNextMajor(from: "1.0.0")),
.package(url: "https://github.com/keefertaylor/Base58Swift.git", .upToNextMajor(from: "2.1.0")),
.package(url: "https://github.com/attaswift/BigInt.git", .upToNextMajor(from: "5.3.0")),
.package(url: "https://github.com/apple/swift-crypto.git", .upToNextMajor(from: "2.1.0")),
.package(url: "https://github.com/jedisct1/swift-sodium.git", .upToNextMajor(from: "0.9.1")),
.package(url: "https://github.com/GigaBitcoin/secp256k1.swift.git", .upToNextMajor(from: "0.6.0")),
],
targets: [
// Targets are the basic building blocks of a package. A target can define a module or a test suite.
// Targets can depend on other targets in this package, and on products in packages this package depends on.
.target(
name: "TezosCore",
dependencies: ["Base58Swift", "BigInt"],
path: "Sources/Core"),
.target(
name: "TezosMichelson",
dependencies: ["TezosCore"],
path: "Sources/Michelson"),
.target(
name: "TezosOperation",
dependencies: ["TezosCore", "TezosMichelson", "TezosCryptoDefault" /* TODO: remove dependency */],
path: "Sources/Operation"),
.target(
name: "TezosRPC",
dependencies: ["TezosCore", "TezosMichelson", "TezosOperation"],
path: "Sources/RPC"),
.target(
name: "TezosContract",
dependencies: [
"TezosCore",
"TezosMichelson",
"TezosOperation",
"TezosRPC",
.product(name: "OrderedCollections", package: "swift-collections"),
"TezosCryptoDefault" /* TODO: remove dependency */,
],
path: "Sources/Contract"),
.target(
name: "TezosCryptoDefault",
dependencies: [
"TezosCore",
.product(name: "Crypto", package: "swift-crypto"),
.product(name: "Clibsodium", package: "swift-sodium"),
.product(name: "secp256k1", package: "secp256k1.swift"),
],
path: "Sources/Crypto/Default"),
// Tests
.target(
name: "TezosTestUtils",
dependencies: ["TezosCore", "TezosMichelson"],
path: "Tests/_Utils"),
.testTarget(
name: "TezosMichelsonTests",
dependencies: ["TezosCore", "TezosMichelson", "TezosTestUtils"],
path: "Tests/Michelson"),
.testTarget(
name: "TezosOperationTests",
dependencies: [
"TezosCore",
"TezosOperation",
"TezosTestUtils",
.product(name: "Clibsodium", package: "swift-sodium"),
],
path: "Tests/Operation"),
.testTarget(
name: "TezosRPCTests",
dependencies: [
"TezosCore",
"TezosOperation",
"TezosRPC",
"TezosTestUtils",
],
path: "Tests/RPC"),
.testTarget(
name: "TezosContractTests",
dependencies: [
"TezosCore",
"TezosMichelson",
"TezosOperation",
"TezosRPC",
"TezosContract",
"TezosTestUtils",
],
path: "Tests/Contract"),
.testTarget(
name: "TezosCryptoDefaultTests",
dependencies: [
"TezosCore",
"TezosCryptoDefault",
"TezosTestUtils",
],
path: "Tests/Crypto/Default"),
]
)