plugins
The uses of package plug-ins by the target.
- SwiftPM
- 5.5+
var plugins: [Target.PluginUsage]?The uses of package plug-ins by the target.
var plugins: [Target.PluginUsage]?s18PackageDescription6TargetC7pluginsSayAC11PluginUsageOGSgvp What are these?7BSMBimport PackageDescriptionCreate reusable code, organize it in a lightweight way, and share it across your projects and with other developers.
final class TargetThe basic building block of a Swift package.
enum PluginUsageA plug-in used in a target.
var cSettings: [CSetting]?The target’s C build settings.
var cxxSettings: [CXXSetting]?The target’s C++ build settings.
var swiftSettings: [SwiftSetting]?The target’s Swift build settings.
var linkerSettings: [LinkerSetting]?The target’s linker settings.
struct BuildConfigurationThe build configuration, such as debug or release.
struct BuildSettingConditionA condition that limits the application of a build setting.
struct CSettingA C language build setting.
struct CXXSettingA CXX-language build setting.
struct SwiftSettingA Swift language build setting.
struct LinkerSettingA linker build setting.
init(name: String, dependencies: [Target.Dependency], path: String?, url: String? = nil, exclude: [String], sources: [String]?, resources: [Resource]? = nil, publicHeadersPath: String?, type: Target.TargetType, packageAccess: Bool, pkgConfig: String? = nil, providers: [SystemPackageProvider]? = nil, pluginCapability: Target.PluginCapability? = nil, cSettings: [CSetting]? = nil, cxxSettings: [CXXSetting]? = nil, swiftSettings: [SwiftSetting]? = nil, linkerSettings: [LinkerSetting]? = nil, checksum: String? = nil, plugins: [Target.PluginUsage]? = nil) Construct a target.
static func binaryTarget(name: String, path: String) -> Target Creates a binary target that references an artifact on disk.
static func binaryTarget(name: String, url: String, checksum: String) -> Target Creates a binary target that references a remote artifact.
static func executableTarget(name: String, dependencies: [Target.Dependency] = [], path: String? = nil, exclude: [String] = [], sources: [String]? = nil, resources: [Resource]? = nil, publicHeadersPath: String? = nil, packageAccess: Bool = true, cSettings: [CSetting]? = nil, cxxSettings: [CXXSetting]? = nil, swiftSettings: [SwiftSetting]? = nil, linkerSettings: [LinkerSetting]? = nil, plugins: [Target.PluginUsage]? = nil) -> Target Creates an executable target.
static func plugin(name: String, capability: Target.PluginCapability, dependencies: [Target.Dependency] = [], path: String? = nil, exclude: [String] = [], sources: [String]? = nil, packageAccess: Bool = true) -> Target Defines a new package plug-in target.
static func systemLibrary(name: String, path: String? = nil, pkgConfig: String? = nil, providers: [SystemPackageProvider]? = nil) -> Target Creates a system library target.
static func target(name: String, dependencies: [Target.Dependency] = [], path: String? = nil, exclude: [String] = [], sources: [String]? = nil, resources: [Resource]? = nil, publicHeadersPath: String? = nil, packageAccess: Bool = true, cSettings: [CSetting]? = nil, cxxSettings: [CXXSetting]? = nil, swiftSettings: [SwiftSetting]? = nil, linkerSettings: [LinkerSetting]? = nil, plugins: [Target.PluginUsage]? = nil) -> Target Creates a regular target.
static func testTarget(name: String, dependencies: [Target.Dependency] = [], path: String? = nil, exclude: [String] = [], sources: [String]? = nil, resources: [Resource]? = nil, packageAccess: Bool = true, cSettings: [CSetting]? = nil, cxxSettings: [CXXSetting]? = nil, swiftSettings: [SwiftSetting]? = nil, linkerSettings: [LinkerSetting]? = nil, plugins: [Target.PluginUsage]? = nil) -> Target Creates a test target.
var checksum: String?The checksum for the archive file that contains the referenced binary artifact.
var dependencies: [Target.Dependency]The target’s dependencies on other entities inside or outside the package.
var exclude: [String]The paths to source and resource files that you don’t want to include in the target.
var isTest: Bool { get }A Boolean value that indicates whether this is a test target.
var name: StringThe name of the target.
let packageAccess: BoolIf true, access to package declarations from other targets in the package is allowed.
var path: String?The path of the target, relative to the package root.
let pkgConfig: String?The name of the package configuration file, without extension, for the system library target.
var pluginCapability: Target.PluginCapability?The capability provided by a package plug-in target.
let providers: [SystemPackageProvider]?The providers array for a system library target.
var publicHeadersPath: String?The path to the directory that contains public headers of a C-family target.
var resources: [Resource]?The explicit list of resource files in the target.
var sources: [String]?The source files in this target.
let type: Target.TargetTypeThe type of the target.
var url: String?The URL of a binary target.
enum DependencyThe different types of a target’s dependency on another entity.
enum PluginCapabilityThe different types of capability that a plug-in can provide.
enum TargetTypeThe different types of a target.
static func executableTarget(name: String, dependencies: [Target.Dependency] = [], path: String? = nil, exclude: [String] = [], sources: [String]? = nil, resources: [Resource]? = nil, publicHeadersPath: String? = nil, cSettings: [CSetting]? = nil, cxxSettings: [CXXSetting]? = nil, swiftSettings: [SwiftSetting]? = nil, linkerSettings: [LinkerSetting]? = nil) -> Target Creates an executable target.
static func executableTarget(name: String, dependencies: [Target.Dependency] = [], path: String? = nil, exclude: [String] = [], sources: [String]? = nil, resources: [Resource]? = nil, publicHeadersPath: String? = nil, cSettings: [CSetting]? = nil, cxxSettings: [CXXSetting]? = nil, swiftSettings: [SwiftSetting]? = nil, linkerSettings: [LinkerSetting]? = nil, plugins: [Target.PluginUsage]? = nil) -> Target Creates an executable target.
static func plugin(name: String, capability: Target.PluginCapability, dependencies: [Target.Dependency] = [], path: String? = nil, exclude: [String] = [], sources: [String]? = nil) -> Target Defines a new package plugin target.
static func target(name: String, dependencies: [Target.Dependency] = [], path: String? = nil, exclude: [String] = [], sources: [String]? = nil, publicHeadersPath: String? = nil) -> Target Creates a library or executable target.
static func target(name: String, dependencies: [Target.Dependency] = [], path: String? = nil, exclude: [String] = [], sources: [String]? = nil, publicHeadersPath: String? = nil, cSettings: [CSetting]? = nil, cxxSettings: [CXXSetting]? = nil, swiftSettings: [SwiftSetting]? = nil, linkerSettings: [LinkerSetting]? = nil) -> Target Creates a library or executable target.
static func target(name: String, dependencies: [Target.Dependency] = [], path: String? = nil, exclude: [String] = [], sources: [String]? = nil, resources: [Resource]? = nil, publicHeadersPath: String? = nil, cSettings: [CSetting]? = nil, cxxSettings: [CXXSetting]? = nil, swiftSettings: [SwiftSetting]? = nil, linkerSettings: [LinkerSetting]? = nil) -> Target Creates a regular target.
static func target(name: String, dependencies: [Target.Dependency] = [], path: String? = nil, exclude: [String] = [], sources: [String]? = nil, resources: [Resource]? = nil, publicHeadersPath: String? = nil, cSettings: [CSetting]? = nil, cxxSettings: [CXXSetting]? = nil, swiftSettings: [SwiftSetting]? = nil, linkerSettings: [LinkerSetting]? = nil, plugins: [Target.PluginUsage]? = nil) -> Target Creates a regular target.
static func testTarget(name: String, dependencies: [Target.Dependency] = [], path: String? = nil, exclude: [String] = [], sources: [String]? = nil) -> Target Creates a test target.
static func testTarget(name: String, dependencies: [Target.Dependency] = [], path: String? = nil, exclude: [String] = [], sources: [String]? = nil, cSettings: [CSetting]? = nil, cxxSettings: [CXXSetting]? = nil, swiftSettings: [SwiftSetting]? = nil, linkerSettings: [LinkerSetting]? = nil) -> Target Creates a test target.
static func testTarget(name: String, dependencies: [Target.Dependency] = [], path: String? = nil, exclude: [String] = [], sources: [String]? = nil, resources: [Resource]? = nil, cSettings: [CSetting]? = nil, cxxSettings: [CXXSetting]? = nil, swiftSettings: [SwiftSetting]? = nil, linkerSettings: [LinkerSetting]? = nil) -> Target Creates a test target.
static func testTarget(name: String, dependencies: [Target.Dependency] = [], path: String? = nil, exclude: [String] = [], sources: [String]? = nil, resources: [Resource]? = nil, cSettings: [CSetting]? = nil, cxxSettings: [CXXSetting]? = nil, swiftSettings: [SwiftSetting]? = nil, linkerSettings: [LinkerSetting]? = nil, plugins: [Target.PluginUsage]? = nil) -> Target Creates a test target.