Target
Represents a single target defined in a package.
protocol TargetBrowse conforming typesRepresents a single target defined in a package.
protocol Targetimport PackagePluginvar dependencies: [TargetDependency] { get }Any other targets on which this target depends, in the same order as they are specified in the package manifest. Conditional dependencies that do not apply have already been filtered out.
var directoryURL: URL { get }The absolute path of the target directory in the local file system.
var id: Self.ID { get }Unique identifier for the target.
var name: String { get }The name of the target, as defined in the package manifest. This name is unique among the targets of the package in which it is defined.
var directory: Path { get }The absolute path of the target directory in the local file system.
var recursiveTargetDependencies: [any Target] { get }The transitive closure of all the targets on which the receiver depends, ordered such that every dependency appears before any other target that depends on it (i.e. in “topological sort order”).
var sourceModule: (any SourceModuleTarget)? { get }Convenience accessor which casts the receiver toSourceModuleTarget if possible.
typealias ID = Stringprotocol SourceModuleTarget : TargetRepresents a target consisting of a source code module, containing either Swift or source files in one of the C-based languages.