Class GitExecutor
java.lang.Object
xyz.ronella.gradle.plugin.simple.git.GitExecutor
The actual assembler of the git command to execute.
- Since:
- 2020-05-05
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionvoidMust hold the execute logic based on the context provided.getArgs()The git command arguments.static xyz.ronella.gradle.plugin.simple.git.GitExecutor.GitExecutorBuilderThe builder of the GitExecutorThe full command that will be executed.The directory to run the git command.The arguments for the executable.The executable to be used in task exec.Provides the git executable.getOpts()The options before the git command.Provides the script to use to force in directory execution.static StringquoteString(String text) A utility for quoting a string.static StringquoteString(String text, OSType osType) A utility for quoting a string based on os type.
-
Field Details
-
OS_TYPE
Holds the OS Type -
GIT_EXE
Holds the git executable.
-
-
Method Details
-
quoteString
A utility for quoting a string.- Parameters:
text- The text to quote.- Returns:
- A quoted string.
-
quoteString
A utility for quoting a string based on os type. Thus the return value is not necessary a quoted text.- Parameters:
text- The text to quote.osType- The os type.- Returns:
- A quoted string.
-
getGitExe
Provides the git executable.- Returns:
- The git executable.
-
getScript
Provides the script to use to force in directory execution.- Returns:
- The path of the script.
-
getDirectory
The directory to run the git command.- Returns:
- The directory to run the git command.
-
execute
Must hold the execute logic based on the context provided.- Parameters:
logic- The executed logic with context.
-
getArgs
The git command arguments.- Returns:
- An array of arguments.
-
getOpts
The options before the git command.- Returns:
- An array of options.
-
getExecutable
The executable to be used in task exec.- Returns:
- The executable name.
-
getExecArgs
The arguments for the executable.- Returns:
- An array of executable args.
-
getCommand
The full command that will be executed.- Returns:
- The full command.
-
getBuilder
public static xyz.ronella.gradle.plugin.simple.git.GitExecutor.GitExecutorBuilder getBuilder()The builder of the GitExecutor- Returns:
- An instance of GitExecutorBuilder.
-