-
Notifications
You must be signed in to change notification settings - Fork 0
/
Package.swift
83 lines (81 loc) · 2.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
// swift-tools-version: 5.9
// The swift-tools-version declares the minimum version of Swift required to build this package.
import PackageDescription
let package = Package(
name: "Function",
platforms: [
.iOS(.v15),
],
products: [
.library(
name: "Function",
targets: ["FunctionSwift"]
),
.plugin(
name: "FunctionEmbed",
targets: ["Embed Predictors", "Bootstrap Project"]
)
],
dependencies: [
.package(url: "https://github.com/apple/swift-argument-parser", from: "1.5.0"),
.package(url: "https://github.com/fxnai/XcodeProj.git", revision: "6bb836a")
],
targets: [
.target(
name: "FunctionSwift",
dependencies: ["Function"],
path: "Sources/Function",
resources: [
.copy("PrivacyInfo.xcprivacy")
]
),
.binaryTarget(
name: "Function",
url: "https://cdn.fxn.ai/fxnc/0.0.31/Function.xcframework.zip",
checksum: "4b0a13719c5849471311672628c5f08c67a93fa070b03c4e22813e7158a70891"
),
.testTarget(
name: "FunctionTests",
dependencies: ["FunctionSwift"]
),
.executableTarget(
name: "FunctionEmbedder",
dependencies: [
.product(name: "ArgumentParser", package: "swift-argument-parser"),
.product(name: "XcodeProj", package: "XcodeProj")
],
path: "Sources/Embed"
),
.plugin(
name: "Bootstrap Project",
capability: .command(
intent: .custom(
verb: "fxn-init",
description: "Initialize Function in your iOS app target."
),
permissions: [
.writeToPackageDirectory(reason: "Allow Function write the Function configuration template.")
]
),
path: "Plugins/Bootstrap"
),
.plugin(
name: "Embed Predictors",
capability: .command(
intent: .custom(
verb: "fxn-embed",
description: "Embed predictors into your app bundle."
),
permissions: [
.allowNetworkConnections(
scope: .all(ports: [80, 443]),
reason: "Allow Function to download and embed predictors into your app."
),
.writeToPackageDirectory(reason: "Allow Function to embed predictors into your app.")
]
),
dependencies: ["FunctionEmbedder"],
path: "Plugins/Embed"
)
]
)