forked from web3swift-team/web3swift
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Package.swift
executable file
·65 lines (60 loc) · 2.28 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
// swift-tools-version:5.4
// The swift-tools-version declares the minimum version of Swift required to build this package.
import PackageDescription
#if os(macOS)
let excludeFiles = [
"./Browser/BrowserViewController.swift", // Because of inheriting iOS only class failed to build on macOS.
]
#elseif os(iOS)
let excludeFiles: String = []
#endif
let package = Package(
name: "Web3swift",
platforms: [
.macOS(.v10_12), .iOS(.v11)
],
products: [
.library(name: "web3swift", targets: ["web3swift"])
],
dependencies: [
.package(url: "https://github.com/attaswift/BigInt.git", from: "5.3.0"),
.package(url: "https://github.com/mxcl/PromiseKit.git", from: "6.16.2"),
.package(url: "https://github.com/daltoniam/Starscream.git", from: "4.0.4"),
.package(url: "https://github.com/krzyzanowskim/CryptoSwift.git", from: "1.4.2")
],
targets: [
.target(name: "secp256k1"),
.target(
name: "web3swift",
dependencies: ["BigInt", "secp256k1", "PromiseKit", "Starscream", "CryptoSwift"],
exclude: excludeFiles,
resources: [
.copy("./Browser/browser.js"),
.copy("./Browser/browser.min.js"),
.copy("./Browser/wk.bridge.min.js")
]
),
.testTarget(
name: "localTests",
dependencies: ["web3swift"],
path: "Tests/web3swiftTests/local_tests",
resources: [
.copy("../../../TestToken/Helpers/SafeMath/SafeMath.sol"),
.copy("../../../TestToken/Helpers/TokenBasics/ERC20.sol"),
.copy("../../../TestToken/Helpers/TokenBasics/IERC20.sol"),
.copy("../../../TestToken/Token/Web3SwiftToken.sol")
]
),
.testTarget(
name: "remoteTests",
dependencies: ["web3swift"],
path: "Tests/web3swiftTests/infura_tests",
resources: [
.copy("../../../TestToken/Helpers/SafeMath/SafeMath.sol"),
.copy("../../../TestToken/Helpers/TokenBasics/ERC20.sol"),
.copy("../../../TestToken/Helpers/TokenBasics/IERC20.sol"),
.copy("../../../TestToken/Token/Web3SwiftToken.sol")
]
),
]
)