Class Build
java.lang.Object
hudson.tasks.BuildStepCompatibilityLayer
hudson.tasks.Builder
io.jenkins.plugins.dotnet.commands.Command
io.jenkins.plugins.dotnet.commands.msbuild.MSBuildCommand
io.jenkins.plugins.dotnet.commands.msbuild.Build
- All Implemented Interfaces:
ExtensionPoint,Describable<Builder>,BuildStep,SimpleBuildStep
A build step to run "
dotnet build", building a project.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classA descriptor for "dotnet build" build steps.Nested classes/interfaces inherited from interface hudson.tasks.BuildStep
BuildStep.PublisherListNested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudsonNested classes/interfaces inherited from interface jenkins.tasks.SimpleBuildStep
SimpleBuildStep.LastBuildAction, SimpleBuildStep.LastBuildActionFactory -
Field Summary
Fields inherited from class io.jenkins.plugins.dotnet.commands.msbuild.MSBuildCommand
configuration, nologo, options, outputDirectory, project, properties, verbosityFields inherited from class io.jenkins.plugins.dotnet.commands.Command
sdk, showSdkInfo, shutDownBuildServers, unstableIfErrors, unstableIfWarnings, workDirectoryFields inherited from interface hudson.tasks.BuildStep
BUILDERS, PUBLISHERS -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidAdds command line arguments for this "dotnet build" invocation.Gets the target framework moniker to use.Gets the runtime identifier to use.Gets the sole target to build.String[]Gets the targets to build.Gets the targets to build.Sets the version suffix to use.booleanisForce()Determines whether dependency resolution should be forced.booleanDetermines whether to ignore project-to-project dependencies.booleanDetermines whether incremental builds are allowed.booleanDetermines whether an implicit restore should be executed as part of this command.voidsetForce(boolean force) Determines whether dependency resolution should be forced.voidsetFramework(String framework) Sets the target framework moniker to use.voidsetNoDependencies(boolean noDependencies) Determines whether to ignore project-to-project dependencies.voidsetNoIncremental(boolean noIncremental) Determines whether incremental builds are allowed.voidsetNoRestore(boolean noRestore) Determines whether an implicit restore should be executed as part of this command.voidsetRuntime(String runtime) Sets the runtime identifier to use.voidSets the sole target to build.voidsetTargets(String... targets) Sets the targets to build.voidsetTargetsString(String targets) Sets the targets to build.voidsetVersionSuffix(String versionSuffix) Sets the version suffix to use.Methods inherited from class io.jenkins.plugins.dotnet.commands.msbuild.MSBuildCommand
getConfiguration, getOption, getOptions, getOptionsString, getOutputDirectory, getProject, getProperties, getPropertiesString, getVerbosity, isNologo, isShutDownBuildServers, isUnstableIfErrors, isUnstableIfWarnings, setConfiguration, setNologo, setOption, setOptions, setOptionsString, setOutputDirectory, setProject, setProperties, setPropertiesString, setShutDownBuildServers, setUnstableIfErrors, setUnstableIfWarnings, setVerbosityMethods inherited from class io.jenkins.plugins.dotnet.commands.Command
getCharset, getDescriptor, getSdk, getSdkDescriptor, getWorkDirectory, isContinueOnError, isShowSdkInfo, isSpecificSdkVersion, perform, setCharset, setContinueOnError, setSdk, setShowSdkInfo, setSpecificSdkVersion, setWorkDirectoryMethods inherited from class hudson.tasks.Builder
all, getRequiredMonitorService, prebuildMethods inherited from class hudson.tasks.BuildStepCompatibilityLayer
getProjectAction, getProjectAction, getProjectActions, perform, perform, prebuildMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface hudson.tasks.BuildStep
getProjectAction, getProjectActions, getRequiredMonitorService, perform, prebuildMethods inherited from interface jenkins.tasks.SimpleBuildStep
perform, perform, requiresWorkspace
-
Constructor Details
-
Build
@DataBoundConstructor public Build()Creates a new "dotnet build" build step.
-
-
Method Details
-
addCommandLineArguments
Adds command line arguments for this "dotnet build" invocation.This adds:
- Any arguments added by
MSBuildCommand.addCommandLineArguments(DotNetArguments). --force, if requested viasetForce(boolean).--no-dependencies, if requested viasetNoDependencies(boolean).--no-incremental, if requested viasetNoIncremental(boolean).--no-restore, if requested viasetNoRestore(boolean).-f:xxx, if a target framework moniker has been specified viasetFramework(String).-r:xxx, if a runtime identifier has been specified viasetRuntime(String).-
-t:xxxfor each target specified viasetTarget(String),setTargets(String...)orsetTargetsString(String). --version-suffix xxx, if a version suffix has been specified viasetRuntime(String).
- Overrides:
addCommandLineArgumentsin classMSBuildCommand- Parameters:
args- The current set of arguments.
- Any arguments added by
-
isForce
public boolean isForce()Determines whether dependency resolution should be forced.- Returns:
truewhen all dependencies should be resolved even if the last restore was successful;falseotherwise.
-
setForce
@DataBoundSetter public void setForce(boolean force) Determines whether dependency resolution should be forced.- Parameters:
force-trueto resolve all dependencies even if the last restore was successful;falseotherwise.
-
getFramework
Gets the target framework moniker to use.- Returns:
- The target framework moniker to use.
-
setFramework
Sets the target framework moniker to use.- Parameters:
framework- The target framework moniker to use.
-
isNoDependencies
public boolean isNoDependencies()Determines whether to ignore project-to-project dependencies.- Returns:
truewhen project-to-project dependencies are ignored;falseotherwise.
-
setNoDependencies
@DataBoundSetter public void setNoDependencies(boolean noDependencies) Determines whether to ignore project-to-project dependencies.- Parameters:
noDependencies-truewhen project-to-project dependencies should be ignored;falseotherwise.
-
isNoIncremental
public boolean isNoIncremental()Determines whether incremental builds are allowed.- Returns:
truewhen incremental builds are disabled;falseotherwise.
-
setNoIncremental
@DataBoundSetter public void setNoIncremental(boolean noIncremental) Determines whether incremental builds are allowed.- Parameters:
noIncremental-trueto disallow incremental builds;falseotherwise.
-
isNoRestore
public boolean isNoRestore()Determines whether an implicit restore should be executed as part of this command.- Returns:
truewhen the implicit restore is disabled;falseotherwise.
-
setNoRestore
@DataBoundSetter public void setNoRestore(boolean noRestore) Determines whether an implicit restore should be executed as part of this command.- Parameters:
noRestore-trueto disable the implicit restore;falseotherwise.
-
getRuntime
Gets the runtime identifier to use.- Returns:
- The runtime identifier to use.
-
setRuntime
Sets the runtime identifier to use.- Parameters:
runtime- The runtime identifier to use.
-
getTarget
Gets the sole target to build.- Returns:
- The sole target to build, or
nullwhen there is not exactly one target set.
-
setTarget
Sets the sole target to build.To set more than one, use
setTargets(String...)instead.- Parameters:
target- The sole target to build.
-
getTargets
Gets the targets to build.- Returns:
- The targets to build.
-
setTargets
Sets the targets to build.- Parameters:
targets- The targets to build.
-
getTargetsString
Gets the targets to build.- Returns:
- The targets to build.
-
setTargetsString
Sets the targets to build.- Parameters:
targets- The targets to build.
-
getVersionSuffix
Sets the version suffix to use.- Returns:
- The version suffix to use.
-
setVersionSuffix
Sets the version suffix to use.- Parameters:
versionSuffix- The version suffix to use.
-