-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathPackage.swift
76 lines (72 loc) · 2.81 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
// swift-tools-version:5.7
// The swift-tools-version declares the minimum version of Swift required to build this package.
import Foundation
import PackageDescription
let resolveDependenciesForTesting = false
let realmDependencies: [Target.Dependency]
if resolveDependenciesForTesting {
realmDependencies = [
.product(name: "RealmSwift", package: "realm-swift")
]
} else {
realmDependencies = [
.product(name: "Realm", package: "realm-swift"),
.product(name: "RealmSwift", package: "realm-swift")
]
}
let package = Package(
name: "InfomaniakCore",
platforms: [
.iOS(.v15),
.macOS(.v11)
],
products: [
.library(
name: "InfomaniakCore",
targets: ["InfomaniakCore"]
),
.library(
name: "InfomaniakCoreDB",
targets: ["InfomaniakCoreDB"]
)
],
dependencies: [
.package(url: "https://github.com/Infomaniak/ios-dependency-injection", .upToNextMajor(from: "2.0.0")),
.package(url: "https://github.com/Infomaniak/ios-login", .upToNextMajor(from: "7.0.0")),
.package(url: "https://github.com/Alamofire/Alamofire", .upToNextMajor(from: "5.8.0")),
.package(url: "https://github.com/getsentry/sentry-cocoa", .upToNextMajor(from: "8.18.0")),
.package(url: "https://github.com/realm/realm-swift", .upToNextMajor(from: "10.45.0")),
.package(url: "https://github.com/weichsel/ZIPFoundation.git", .upToNextMajor(from: "0.9.0")),
.package(url: "https://github.com/MarcoEidinger/OSInfo.git", .upToNextMajor(from: "1.0.0"))
],
targets: [
.target(
name: "InfomaniakCore",
dependencies: [
"Alamofire",
.product(name: "InfomaniakDI", package: "ios-dependency-injection"),
.product(name: "InfomaniakLogin", package: "ios-login"),
.product(name: "Sentry-Dynamic", package: "sentry-cocoa"),
.product(name: "OSInfo", package: "OSInfo")
]
),
.target(
name: "InfomaniakCoreDB",
dependencies: [
"InfomaniakCore",
.product(name: "InfomaniakDI", package: "ios-dependency-injection")
] + realmDependencies
),
.testTarget(
name: "InfomaniakCoreTests",
dependencies: ["InfomaniakCore", "InfomaniakCoreDB", "ZIPFoundation"],
resources: [
Resource
.copy("Resources/Matterhorn_as_seen_from_Zermatt,_Wallis,_Switzerland,_2012_August,Wikimedia_Commons.heic"),
Resource
.copy("Resources/Matterhorn_as_seen_from_Zermatt,_Wallis,_Switzerland,_2012_August,Wikimedia_Commons.jpg"),
Resource.copy("Resources/dummy.pdf")
]
)
]
)