BuildParameters
Parameters and options to apply during a build.
struct BuildParameters
Parameters and options to apply during a build.
struct BuildParameters
import PackagePlugin
struct PackageManager
Provides specialized information and services from the Swift Package Manager or an IDE that supports Swift Packages. Different plugin hosts implement the functionality in whatever way is appropriate for them, but should preserve the same semantics described here.
func build(_ subset: BuildSubset, parameters: BuildParameters) throws -> BuildResult
Performs a build of all or a subset of products and targets in a package.
func getSymbolGraph(for target: Target, options: SymbolGraphOptions) throws -> SymbolGraphResult
Return a directory containing symbol graph files for the given target and options. If the symbol graphs need to be created or updated first, they will be. SwiftPM or an IDE may generate these symbol graph files in any way it sees fit.
func test(_ subset: TestSubset, parameters: TestParameters) throws -> TestResult
Runs all or a specified subset of the unit tests of the package, after an incremental build if necessary (the same as swift test
does).
enum BuildConfiguration
Represents an overall purpose of the build, which affects such things as optimization and generation of debug symbols.
enum BuildLogVerbosity
Represents the amount of detail in a build log.
struct BuildResult
Represents the results of running a build.
enum BuildSubset
Specifies a subset of products and targets of a package to build.
struct SymbolGraphOptions
Represents options for symbol graph generation.
struct SymbolGraphResult
Represents the result of symbol graph generation.
struct TestParameters
Parameters that control how the tests are run.
struct TestResult
Represents the result of running unit tests.
enum TestSubset
Specifies what tests in a package to run.
init(configuration: BuildConfiguration = .debug, logging: BuildLogVerbosity = .concise, echoLogs: Bool = false)
var configuration: BuildConfiguration
Whether to build for debug or release.
var echoLogs: Bool
Whether to print build logs to the console
var logging: BuildLogVerbosity
Controls the amount of detail in the log returned in the build result.
var otherCFlags: [String]
Additional flags to pass to all C compiler invocations.
var otherCxxFlags: [String]
Additional flags to pass to all C++ compiler invocations.
var otherLinkerFlags: [String]
Additional flags to pass to all linker invocations.
var otherSwiftcFlags: [String]
Additional flags to pass to all Swift compiler invocations.