-
Notifications
You must be signed in to change notification settings - Fork 0
/
Package.swift
41 lines (39 loc) · 1.3 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
// swift-tools-version: 5.10
// The swift-tools-version declares the minimum version of Swift required to build this package.
import PackageDescription
let package = Package(
name: "PackageGeneratorPlugin",
platforms: [
.macOS(.v12),
],
products: [
.plugin(name: "PackageGenerator", targets: ["Package Generator"]),
],
targets: [
.binaryTarget(
name: "package-generator-cli",
url: "https://github.com/mackoj/PackageGeneratorCLI/releases/download/0.5.2/package-generator-cli-arm64-apple-macosx.artifactbundle.zip",
checksum: "b374072f0c4ce56761be1cc00469b14f8c415e06758bb82f8485b17768f06b0f"
),
// .binaryTarget(
// name: "package-generator-cli",
// path: "../PackageGeneratorCLI/package-generator-cli-arm64-apple-macosx.artifactbundle.zip"
// ),
.plugin(
name: "Package Generator",
capability: .command(
intent: .custom(
verb: "package-generator",
description: "Generate the Package.swift based on packageGenerator.json"
),
permissions: [
.writeToPackageDirectory(reason: "This plug-in need to update the Package.swift in the package folder."),
]
),
dependencies: [
.target(name: "package-generator-cli"),
],
path: "Plugins/PackageGenerator"
),
]
)