-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #52 from FelixHerrmann/release/3.0
Release 3.0
- Loading branch information
Showing
13 changed files
with
474 additions
and
86 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
39 changes: 39 additions & 0 deletions
39
Plugins/SwiftPackageListJSONPlugin/SwiftPackageListJSONPlugin.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
// | ||
// SwiftPackageListJSONPlugin.swift | ||
// SwiftPackageListJSONPlugin | ||
// | ||
// Created by Felix Herrmann on 22.05.23. | ||
// | ||
|
||
import Foundation | ||
import PackagePlugin | ||
|
||
@main | ||
struct SwiftPackageListJSONPlugin: BuildToolPlugin { | ||
func createBuildCommands(context: PluginContext, target: Target) async throws -> [Command] { | ||
return [] | ||
} | ||
} | ||
|
||
#if canImport(XcodeProjectPlugin) | ||
import XcodeProjectPlugin | ||
|
||
extension SwiftPackageListJSONPlugin: XcodeBuildToolPlugin { | ||
func createBuildCommands(context: XcodePluginContext, target: XcodeTarget) throws -> [Command] { | ||
let projectPath = context.xcodeProject.directory.appending("\(context.xcodeProject.displayName).xcodeproj") | ||
let executable = try context.tool(named: "SwiftPackageListCommand").path | ||
.removingLastComponent() | ||
.appending("swift-package-list") | ||
let outputPath = context.pluginWorkDirectory | ||
let fileType = "json" | ||
return [ | ||
.buildCommand( | ||
displayName: "SwiftPackageListPlugin", | ||
executable: executable, | ||
arguments: ["generate", projectPath, "--output-path", outputPath, "--file-type", fileType, "--requires-license"], | ||
outputFiles: [outputPath.appending("package-list.json")] | ||
) | ||
] | ||
} | ||
} | ||
#endif |
39 changes: 39 additions & 0 deletions
39
Plugins/SwiftPackageListPDFPlugin/SwiftPackageListPDFPlugin.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
// | ||
// SwiftPackageListPDFPlugin.swift | ||
// SwiftPackageListPDFPlugin | ||
// | ||
// Created by Felix Herrmann on 27.05.23. | ||
// | ||
|
||
import Foundation | ||
import PackagePlugin | ||
|
||
@main | ||
struct SwiftPackageListPDFPlugin: BuildToolPlugin { | ||
func createBuildCommands(context: PluginContext, target: Target) async throws -> [Command] { | ||
return [] | ||
} | ||
} | ||
|
||
#if canImport(XcodeProjectPlugin) | ||
import XcodeProjectPlugin | ||
|
||
extension SwiftPackageListPDFPlugin: XcodeBuildToolPlugin { | ||
func createBuildCommands(context: XcodePluginContext, target: XcodeTarget) throws -> [Command] { | ||
let projectPath = context.xcodeProject.directory.appending("\(context.xcodeProject.displayName).xcodeproj") | ||
let executable = try context.tool(named: "SwiftPackageListCommand").path | ||
.removingLastComponent() | ||
.appending("swift-package-list") | ||
let outputPath = context.pluginWorkDirectory | ||
let fileType = "pdf" | ||
return [ | ||
.buildCommand( | ||
displayName: "SwiftPackageListPlugin", | ||
executable: executable, | ||
arguments: ["generate", projectPath, "--output-path", outputPath, "--file-type", fileType, "--requires-license"], | ||
outputFiles: [outputPath.appending("Acknowledgements.pdf")] | ||
) | ||
] | ||
} | ||
} | ||
#endif |
39 changes: 39 additions & 0 deletions
39
Plugins/SwiftPackageListPropertyListPlugin/SwiftPackageListPropertyListPlugin.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
// | ||
// SwiftPackageListPropertyListPlugin.swift | ||
// SwiftPackageListPropertyListPlugin | ||
// | ||
// Created by Felix Herrmann on 27.05.23. | ||
// | ||
|
||
import Foundation | ||
import PackagePlugin | ||
|
||
@main | ||
struct SwiftPackageListPropertyListPlugin: BuildToolPlugin { | ||
func createBuildCommands(context: PluginContext, target: Target) async throws -> [Command] { | ||
return [] | ||
} | ||
} | ||
|
||
#if canImport(XcodeProjectPlugin) | ||
import XcodeProjectPlugin | ||
|
||
extension SwiftPackageListPropertyListPlugin: XcodeBuildToolPlugin { | ||
func createBuildCommands(context: XcodePluginContext, target: XcodeTarget) throws -> [Command] { | ||
let projectPath = context.xcodeProject.directory.appending("\(context.xcodeProject.displayName).xcodeproj") | ||
let executable = try context.tool(named: "SwiftPackageListCommand").path | ||
.removingLastComponent() | ||
.appending("swift-package-list") | ||
let outputPath = context.pluginWorkDirectory | ||
let fileType = "plist" | ||
return [ | ||
.buildCommand( | ||
displayName: "SwiftPackageListPlugin", | ||
executable: executable, | ||
arguments: ["generate", projectPath, "--output-path", outputPath, "--file-type", fileType, "--requires-license"], | ||
outputFiles: [outputPath.appending("package-list.plist")] | ||
) | ||
] | ||
} | ||
} | ||
#endif |
39 changes: 39 additions & 0 deletions
39
Plugins/SwiftPackageListSettingsBundlePlugin/SwiftPackageListSettingsBundlePlugin.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
// | ||
// SwiftPackageListSettingsBundlePlugin.swift | ||
// SwiftPackageListSettingsBundlePlugin | ||
// | ||
// Created by Felix Herrmann on 27.05.23. | ||
// | ||
|
||
import Foundation | ||
import PackagePlugin | ||
|
||
@main | ||
struct SwiftPackageListSettingsBundlePlugin: BuildToolPlugin { | ||
func createBuildCommands(context: PluginContext, target: Target) async throws -> [Command] { | ||
return [] | ||
} | ||
} | ||
|
||
#if canImport(XcodeProjectPlugin) | ||
import XcodeProjectPlugin | ||
|
||
extension SwiftPackageListSettingsBundlePlugin: XcodeBuildToolPlugin { | ||
func createBuildCommands(context: XcodePluginContext, target: XcodeTarget) throws -> [Command] { | ||
let projectPath = context.xcodeProject.directory.appending("\(context.xcodeProject.displayName).xcodeproj") | ||
let executable = try context.tool(named: "SwiftPackageListCommand").path | ||
.removingLastComponent() | ||
.appending("swift-package-list") | ||
let outputPath = context.pluginWorkDirectory | ||
let fileType = "settings-bundle" | ||
return [ | ||
.buildCommand( | ||
displayName: "SwiftPackageListPlugin", | ||
executable: executable, | ||
arguments: ["generate", projectPath, "--output-path", outputPath, "--file-type", fileType, "--requires-license"], | ||
outputFiles: [outputPath.appending("Settings.bundle")] | ||
) | ||
] | ||
} | ||
} | ||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.