All Implemented Interfaces:
ExtensionPoint, Describable<Builder>, BuildStep, SimpleBuildStep

public final class Locals extends NuGetCommand
A build step to run "dotnet nuget locals", listing or clearing one or more local package stores.
  • Constructor Details

    • Locals

      @DataBoundConstructor public Locals()
      Creates a new "dotnet nuget locals" build step.
  • Method Details

    • addCommandLineArguments

      protected void addCommandLineArguments(@NonNull DotNetArguments args) throws AbortException
      Description copied from class: NuGetCommand
      Adds command line arguments for this .NET NuGet command invocation.

      This adds:

      1. nuget
      2. The sub-command (e.g. push), if applicable.
      3. --force-english-output, if requested via NuGetCommand.setForceEnglishOutput(boolean).
      Overrides:
      addCommandLineArguments in class NuGetCommand
      Parameters:
      args - The current set of arguments.
      Throws:
      AbortException - When something goes wrong.
    • getCacheLocation

      @NonNull public String getCacheLocation()
      Gets the cache location to operate on.

      This can be one of:

      • "global-packages": the global package cache
      • "http-cache": the cache used for HTTP responses
      • "temp": temporary storage
      • "all": all of the above
      Returns:
      The cache location to operate on.
    • setCacheLocation

      @DataBoundSetter public void setCacheLocation(@NonNull String cacheLocation)
      Sets the cache location to operate on.
      Parameters:
      cacheLocation - The cache location to operate on; this can be one of:
      • "global-packages": the global package cache
      • "http-cache": the cache used for HTTP responses
      • "temp": temporary storage
      • "all": all of the above
    • getOperation

      @NonNull public String getOperation()
      Gets the operation to apply.

      This can be one of:

      • "clear": clears the contents of the cache location
      • "list": shows the path to the cache location
      Returns:
      The operation to apply.
    • setOperation

      @DataBoundSetter public void setOperation(@NonNull String operation)
      Sets the operation to apply.
      Parameters:
      operation - The operation to apply; this can be one of:
      • "clear": clears the contents of the cache location
      • "list": shows the path to the cache location