forked from ResearchKit/SageResearch
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Package.swift
109 lines (102 loc) · 3.74 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
99
100
101
102
103
104
105
106
107
108
109
// swift-tools-version:5.3
// The swift-tools-version declares the minimum version of Swift required to build this package.
import PackageDescription
let package = Package(
name: "SageResearch",
defaultLocalization: "en",
platforms: [
// Add support for all platforms starting from a specific version.
.macOS(.v11),
.iOS(.v14),
.watchOS(.v6),
.tvOS(.v14)
],
products: [
// Products define the executables and libraries a package produces, and make them visible to other packages.
.library(
name: "Research",
targets: ["Research",
"Formatters",
]),
.library(
name: "ResearchUI",
targets: ["ResearchUI"]),
.library(
name: "Research_UnitTest",
targets: ["Research_UnitTest", "NSLocaleSwizzle"]),
],
dependencies: [
// Dependencies declare other packages that this package depends on.
.package(name: "JsonModel",
url: "https://github.com/Sage-Bionetworks/JsonModel-Swift.git",
"1.6.0"..<"3.0.0"),
.package(name: "MobilePassiveData",
url: "https://github.com/Sage-Bionetworks/MobilePassiveData-SDK.git",
from: "1.4.0"),
.package(url: "https://github.com/Sage-Bionetworks/AssessmentModelKMM.git",
from: "1.0.0"),
],
targets: [
// Research is the main target included in this repo. The "Formatters"
// target is developed in Obj-c so it requires a separate target.
.target(
name: "Research",
dependencies: ["JsonModel",
"Formatters",
.product(name: "MobilePassiveData",
package: "MobilePassiveData"),
],
path: "Research/Research/",
exclude: ["Info-iOS.plist",
"Core/README.md",
"DataModel/README.md",
]),
.target(name: "Formatters",
dependencies: [],
path: "Research/Formatters/",
exclude: ["Info.plist"]),
// ResearchUI currently only supports iOS devices. This includes views and view
// controllers and references UIKit.
.target(
name: "ResearchUI",
dependencies: [
"Research",
.product(name: "AssessmentModelUI", package: "AssessmentModelKMM"),
],
path: "Research/ResearchUI/",
exclude: ["Info-iOS.plist"],
resources: [
.process("PlatformContext/Resources"),
.process("iOS/Resources"),
]),
// The following targets are set up for unit testing.
.target(
name: "Research_UnitTest",
dependencies: ["Research",
"ResearchUI",
],
path: "Research/Research_UnitTest/",
exclude: ["Info.plist"]),
.target(name: "NSLocaleSwizzle",
dependencies: [],
path: "Research/NSLocaleSwizzle/",
exclude: ["Info.plist"]),
.testTarget(
name: "ResearchTests",
dependencies: [
"Research",
"Research_UnitTest",
"NSLocaleSwizzle",
],
path: "Research/ResearchTests/",
exclude: ["Info-iOS.plist"],
resources: [
.process("Resources"),
]),
.testTarget(
name: "ResearchUITests",
dependencies: ["ResearchUI"],
path: "Research/ResearchUITests/",
exclude: ["Info.plist"]),
]
)