Package com.diffplug.gradle
Class CmdLine
java.lang.Object
com.diffplug.gradle.CmdLine
Implementation of
CmdLineTask, but helpful for implementing other things as well.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classReturns the given result.static class -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidvoidSets the working directory to the given dir, then executes the given command.voidExecutes the given command.voidRemoves the given file or directory.voidechoCmd(boolean echoCmd) Determines whether commands are echoed.voidechoOutput(boolean echoOutput) Determines whether the output of commands are echoed.voidRemoves the given file or directory.voidRuns the commands that have been queued up.voidRemoves the given file or directory.voidrun(CmdLine.SerializableAction action) Removes the given file or directory.voidrun(groovy.lang.Closure<?> action) Removes the given file or directory.static CmdLine.ResultRuns the given command in the given directory.static CmdLine.ResultRuns the given command in the given directory with the given echo setting.static CmdLine.ResultRuns the given command in the current working directory.
-
Constructor Details
-
CmdLine
public CmdLine()
-
-
Method Details
-
echoCmd
public void echoCmd(boolean echoCmd) Determines whether commands are echoed. Default value is true. -
echoOutput
public void echoOutput(boolean echoOutput) Determines whether the output of commands are echoed. Default value is true. -
cmd
Executes the given command. -
cmd
Sets the working directory to the given dir, then executes the given command. -
cleanDir
-
rm
Removes the given file or directory. -
copy
Removes the given file or directory. -
mv
Removes the given file or directory. -
run
public void run(groovy.lang.Closure<?> action) Removes the given file or directory. -
run
Removes the given file or directory. -
performActions
Runs the commands that have been queued up.- Throws:
Throwable
-
runCmd
Runs the given command in the current working directory.- Throws:
IOException
-
runCmd
Runs the given command in the given directory.- Throws:
IOException
-
runCmd
public static CmdLine.Result runCmd(File directory, String cmd, boolean echoCmd, boolean echoOutput) throws IOException Runs the given command in the given directory with the given echo setting.- Throws:
IOException
-