forked from algolia/algoliasearch-client-swift
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Package.swift
57 lines (52 loc) · 1.45 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
// swift-tools-version:5.1
// The swift-tools-version declares the minimum version of Swift required to build this package.
import PackageDescription
#if os(Linux)
let macOSVersion: SupportedPlatform.MacOSVersion = .v10_15
#else
let macOSVersion: SupportedPlatform.MacOSVersion = .v10_10
#endif
#if os(Linux)
let extraPackageDependencies: [Package.Dependency] = [
.package(url: "https://github.com/apple/swift-crypto.git", from: "1.1.2")
]
#else
let extraPackageDependencies: [Package.Dependency] = []
#endif
#if os(Linux)
let extraTargetDependencies: [Target.Dependency] = [
.product(name: "Crypto", package: "swift-crypto")
]
#else
let extraTargetDependencies: [Target.Dependency] = []
#endif
let package = Package(
name: "AlgoliaSearchClient",
platforms: [
.iOS(.v9),
.macOS(macOSVersion),
.watchOS(.v2),
.tvOS(.v9)
],
products: [
.library(
name: "AlgoliaSearchClient",
targets: ["AlgoliaSearchClient"])
],
dependencies: [
.package(url:"https://github.com/apple/swift-log.git", from: "1.4.0")
] + extraPackageDependencies,
targets: [
.target(
name: "AlgoliaSearchClient",
dependencies: [
.product(name: "Logging", package: "swift-log")
] + extraTargetDependencies),
.testTarget(
name: "AlgoliaSearchClientTests",
dependencies: [
.target(name: "AlgoliaSearchClient"),
.product(name: "Logging", package: "swift-log")
] + extraTargetDependencies)
]
)