-
Notifications
You must be signed in to change notification settings - Fork 4
/
Package.swift
98 lines (95 loc) · 3.65 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
// swift-tools-version: 5.8
// The swift-tools-version declares the minimum version of Swift required to build this package.
import PackageDescription
let package = Package(
name: "FirebaseAdmin",
platforms: [
.iOS(.v15), .macOS(.v10_15)
],
products: [
.library(
name: "FirebaseApp",
targets: ["FirebaseApp"]),
.library(
name: "AppCheck",
targets: ["AppCheck"]),
.library(
name: "Firestore",
targets: ["Firestore"]),
.library(
name: "FirebaseAuth",
targets: ["FirebaseAuth"]),
.library(
name: "FirebaseMessaging",
targets: ["FirebaseMessaging"]),
],
dependencies: [
.package(url: "https://github.com/swift-server/async-http-client.git", from: "1.21.2"),
.package(url: "https://github.com/apple/swift-nio.git", from: "2.68.0"),
.package(url: "https://github.com/1amageek/FirebaseAPI.git", branch: "main"),
.package(url: "https://github.com/vapor/jwt-kit.git", from: "4.13.4"),
.package(url: "https://github.com/Flight-School/AnyCodable", from: "0.6.7")
],
targets: [
.target(
name: "FirebaseApp",
dependencies: [
.product(name: "NIOFoundationCompat", package: "swift-nio"),
.product(name: "AsyncHTTPClient", package: "async-http-client"),
.product(name: "JWTKit", package: "jwt-kit"),
],
swiftSettings: [
.enableExperimentalFeature("StrictConcurrency=targeted", .when(platforms: [.macOS, .iOS])),
.enableUpcomingFeature("SWIFT_UPCOMING_FEATURE_FORWARD_TRAILING_CLOSURES")
]
),
.target(
name: "AppCheck",
dependencies: [
"FirebaseApp",
.product(name: "AsyncHTTPClient", package: "async-http-client"),
.product(name: "JWTKit", package: "jwt-kit")
],
swiftSettings: swiftSettings),
.target(
name: "Firestore",
dependencies: [
"FirebaseApp",
.product(name: "AsyncHTTPClient", package: "async-http-client"),
.product(name: "FirestoreAPI", package: "FirebaseAPI"),
.product(name: "JWTKit", package: "jwt-kit"),
],swiftSettings: swiftSettings),
.target(
name: "FirebaseAuth",
dependencies: [
"FirebaseApp",
.product(name: "AsyncHTTPClient", package: "async-http-client"),
.product(name: "JWTKit", package: "jwt-kit"),
.product(name: "AnyCodable", package: "AnyCodable"),
],swiftSettings: swiftSettings),
.target(
name: "FirebaseMessaging",
dependencies: [
"FirebaseApp",
.product(name: "AsyncHTTPClient", package: "async-http-client"),
.product(name: "JWTKit", package: "jwt-kit"),
],swiftSettings: swiftSettings),
.testTarget(
name: "AppCheckTests",
dependencies: [
"AppCheck",
.product(name: "NIOFoundationCompat", package: "swift-nio"),
.product(name: "AsyncHTTPClient", package: "async-http-client")
]
),
.testTarget(
name: "FirestoreTests",
dependencies: ["Firestore"],
resources: [.copy("ServiceAccount.json")]
),
]
)
var swiftSettings: [SwiftSetting] { [
.enableUpcomingFeature("DisableOutwardActorInference"),
.enableExperimentalFeature("StrictConcurrency"),
] }