forked from tgrapperon/swift-composable-environment
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Package.swift
86 lines (79 loc) · 2.39 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
// swift-tools-version:5.3
import PackageDescription
/// Because some code is shared between `ComposableEnvironment` and `GlobalEnvironment`, and in
/// order to expose only the minimum API surface, the package is split in several targets.
///
/// The third product called `ComposableDependencies` can be used in case you want to define
/// dependencies in an environment-agnostic way. Such dependencies can then be imported and used by
/// `ComposableEnvironment` or `GlobalEnvironment`.
///
/// Targets with names starting with a underscore are used for implementation only and their types
/// exported on a case by case basis. They should not be imported as a whole without prefixing the
/// import with the `@_implementationOnly` keyword.
let package = Package(
name: "swift-composable-environment",
platforms: [
.iOS(.v13),
.macOS(.v10_15),
.tvOS(.v13),
.watchOS(.v6),
],
products: [
.library(
name: "ComposableDependencies",
targets: ["ComposableDependencies"]
),
.library(
name: "ComposableEnvironment",
targets: ["ComposableEnvironment"]
),
.library(
name: "GlobalEnvironment",
targets: ["GlobalEnvironment"]
),
],
dependencies: [
.package(url: "https://github.com/pointfreeco/swift-composable-architecture", from: "0.21.0"),
],
targets: [
.target(
name: "ComposableDependencies",
dependencies: ["_Dependencies"]
),
.target(
name: "ComposableEnvironment",
dependencies: [
.product(name: "ComposableArchitecture", package: "swift-composable-architecture"),
"ComposableDependencies",
"_Dependencies",
"_DependencyAliases",
]
),
.testTarget(
name: "ComposableEnvironmentTests",
dependencies: ["ComposableEnvironment"]
),
.target(name: "_Dependencies"),
.target(
name: "_DependencyAliases",
dependencies: ["ComposableDependencies"]
),
.testTarget(
name: "DependencyAliasesTests",
dependencies: ["_DependencyAliases"]
),
.target(
name: "GlobalEnvironment",
dependencies: [
.product(name: "ComposableArchitecture", package: "swift-composable-architecture"),
"ComposableDependencies",
"_Dependencies",
"_DependencyAliases",
]
),
.testTarget(
name: "GlobalEnvironmentTests",
dependencies: ["GlobalEnvironment"]
),
]
)