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
Modifier and TypeClassDescriptionstatic final class
A descriptor for "dotnet build
" build steps.Nested classes/interfaces inherited from interface hudson.tasks.BuildStep
BuildStep.PublisherList
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson
Nested 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, verbosity
Fields inherited from class io.jenkins.plugins.dotnet.commands.Command
sdk, showSdkInfo, shutDownBuildServers, unstableIfErrors, unstableIfWarnings, workDirectory
Fields inherited from interface hudson.tasks.BuildStep
BUILDERS, PUBLISHERS
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
Adds 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.boolean
isForce()
Determines whether dependency resolution should be forced.boolean
Determines whether to ignore project-to-project dependencies.boolean
Determines whether incremental builds are allowed.boolean
Determines whether an implicit restore should be executed as part of this command.void
setForce
(boolean force) Determines whether dependency resolution should be forced.void
setFramework
(String framework) Sets the target framework moniker to use.void
setNoDependencies
(boolean noDependencies) Determines whether to ignore project-to-project dependencies.void
setNoIncremental
(boolean noIncremental) Determines whether incremental builds are allowed.void
setNoRestore
(boolean noRestore) Determines whether an implicit restore should be executed as part of this command.void
setRuntime
(String runtime) Sets the runtime identifier to use.void
Sets the sole target to build.void
setTargets
(String... targets) Sets the targets to build.void
setTargetsString
(String targets) Sets the targets to build.void
setVersionSuffix
(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, setVerbosity
Methods inherited from class io.jenkins.plugins.dotnet.commands.Command
getCharset, getDescriptor, getSdk, getSdkDescriptor, getWorkDirectory, isContinueOnError, isShowSdkInfo, isSpecificSdkVersion, perform, setCharset, setContinueOnError, setSdk, setShowSdkInfo, setSpecificSdkVersion, setWorkDirectory
Methods inherited from class hudson.tasks.Builder
all, getRequiredMonitorService, prebuild
Methods inherited from class hudson.tasks.BuildStepCompatibilityLayer
getProjectAction, getProjectAction, getProjectActions, perform, perform, prebuild
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface hudson.tasks.BuildStep
getProjectAction, getProjectActions, getRequiredMonitorService, perform, prebuild
Methods 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:xxx
for each target specified viasetTarget(String)
,setTargets(String...)
orsetTargetsString(String)
. --version-suffix xxx
, if a version suffix has been specified viasetRuntime(String)
.
- Overrides:
addCommandLineArguments
in classMSBuildCommand
- Parameters:
args
- The current set of arguments.
- Any arguments added by
-
isForce
public boolean isForce()Determines whether dependency resolution should be forced.- Returns:
true
when all dependencies should be resolved even if the last restore was successful;false
otherwise.
-
setForce
@DataBoundSetter public void setForce(boolean force) Determines whether dependency resolution should be forced.- Parameters:
force
-true
to resolve all dependencies even if the last restore was successful;false
otherwise.
-
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:
true
when project-to-project dependencies are ignored;false
otherwise.
-
setNoDependencies
@DataBoundSetter public void setNoDependencies(boolean noDependencies) Determines whether to ignore project-to-project dependencies.- Parameters:
noDependencies
-true
when project-to-project dependencies should be ignored;false
otherwise.
-
isNoIncremental
public boolean isNoIncremental()Determines whether incremental builds are allowed.- Returns:
true
when incremental builds are disabled;false
otherwise.
-
setNoIncremental
@DataBoundSetter public void setNoIncremental(boolean noIncremental) Determines whether incremental builds are allowed.- Parameters:
noIncremental
-true
to disallow incremental builds;false
otherwise.
-
isNoRestore
public boolean isNoRestore()Determines whether an implicit restore should be executed as part of this command.- Returns:
true
when the implicit restore is disabled;false
otherwise.
-
setNoRestore
@DataBoundSetter public void setNoRestore(boolean noRestore) Determines whether an implicit restore should be executed as part of this command.- Parameters:
noRestore
-true
to disable the implicit restore;false
otherwise.
-
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
null
when 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.
-