-
Notifications
You must be signed in to change notification settings - Fork 764
/
Package.swift
68 lines (64 loc) · 2.83 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
// swift-tools-version:5.6
import PackageDescription
let package = Package(
name: "Rswift",
platforms: [
.macOS(.v10_15),
.iOS(.v11),
.tvOS(.v11),
.watchOS(.v4),
],
products: [
.executable(name: "rswift", targets: ["rswift"]),
.library(name: "RswiftLibrary", targets: ["RswiftResources"]),
.plugin(name: "RswiftGenerateInternalResources", targets: ["RswiftGenerateInternalResources"]),
.plugin(name: "RswiftGeneratePublicResources", targets: ["RswiftGeneratePublicResources"]),
.plugin(name: "RswiftGenerateResourcesCommand", targets: ["RswiftGenerateResourcesCommand"]),
.plugin(name: "RswiftModifyXcodePackages", targets: ["RswiftModifyXcodePackages"]),
],
dependencies: [
.package(url: "https://github.com/tomlokhorst/XcodeEdit", from: "2.11.1"),
.package(url: "https://github.com/apple/swift-argument-parser", from: "1.1.0"),
],
targets: [
.target(name: "RswiftResources"),
.target(name: "RswiftGenerators", dependencies: ["RswiftResources"]),
.target(name: "RswiftParsers", dependencies: ["RswiftResources", "XcodeEdit"]),
.testTarget(name: "RswiftGeneratorsTests", dependencies: ["RswiftGenerators"]),
.testTarget(name: "RswiftParsersTests", dependencies: ["RswiftParsers"]),
// Executable that brings all previous parts together
.executableTarget(name: "rswift", dependencies: [
.target(name: "RswiftParsers"),
.target(name: "RswiftGenerators"),
.product(name: "ArgumentParser", package: "swift-argument-parser"),
]),
.plugin(name: "RswiftGenerateInternalResources", capability: .buildTool(), dependencies: ["rswift"]),
.plugin(name: "RswiftGeneratePublicResources", capability: .buildTool(), dependencies: ["rswift"]),
.plugin(
name: "RswiftGenerateResourcesCommand",
capability: .command(
intent: .custom(
verb: "rswift-generate-resources",
description: "Rswift generate resources"
),
permissions: [
.writeToPackageDirectory(reason: "Rswift generates a file with statically typed, autocompleted resources")
]
),
dependencies: ["rswift"]
),
.plugin(
name: "RswiftModifyXcodePackages",
capability: .command(
intent: .custom(
verb: "rswift-modify-xcode-packages",
description: "Rswift modify Xcode packages"
),
permissions: [
.writeToPackageDirectory(reason: "Modifies Xcode project to fix package reference for plugins")
]
),
dependencies: ["rswift"]
),
]
)