Avatar
CommandInvocationだから
10:28 AM
そもそもシステムインストールが期待されてるよね
10:29 AM
// swift-tools-version: 999.0 import PackageDescription let package = Package( name: "SwiftGen", targets: [ /// Package plugin that tells SwiftPM how to run `swiftgen` based on /// the configuration file. Client targets use this plugin by listing /// it in their `plugins` parameter. This example uses the `prebuild` /// capability, to make `swiftgen` run before each build. /// A different example might use the `builtTool` capability, if the /// names of inputs and outputs could be known ahead of time. .plugin( name: "SwiftGenPlugin", capability: .prebuild(), dependencies: ["SwiftGen"] ), /// Binary target that provides the built SwiftGen executables. .binaryTarget( name: "SwiftGen", url: "https://url/to/the/built/swiftgen-executables.zip", checksum: "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" ), ] )
10:29 AM
いや、ツールバイナリ自体はSwiftPMが固定するのか
10:29 AM
try targetBuildContext.lookupTool(named: "swiftgen"), じゃあこれは結構特殊なlookupなんだな