Class CMakeExecutor
java.lang.Object
io.github.glorrian.cmakegradleplugin.CMakeExecutor
Executor implementation for running CMake commands.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classA callable class for use inThreadPoolExecutorUsed to print information from input streams (Basic input stream and error input stream) -
Constructor Summary
ConstructorsConstructorDescriptionCMakeExecutor(Class<?> execClass) Accepts an argument to define the task for which the command will be executed. -
Method Summary
Modifier and TypeMethodDescriptionvoidA method for executing a command in a specific build directory.voidexecute(List<String> cmdLine, File workingDir, Consumer<? super String> inputPrintAction, Consumer<? super String> errorPrintAction) A method for executing a command in a specific build directory with custom print functions.
-
Constructor Details
-
CMakeExecutor
Accepts an argument to define the task for which the command will be executed. The class object is used only for logging- Parameters:
execClass-Classlabel for logger messages
-
-
Method Details
-
execute
A method for executing a command in a specific build directory.- Parameters:
cmdLine- List containing command line arguments. Each argument must be defined in a separate list item. Spaces inside arguments are not allowedworkingDir- Directory where the commands are executed
-
execute
public void execute(List<String> cmdLine, File workingDir, Consumer<? super String> inputPrintAction, Consumer<? super String> errorPrintAction) A method for executing a command in a specific build directory with custom print functions.- Parameters:
cmdLine- List containing command line arguments. Each argument must be defined in a separate list item. Spaces inside arguments are not allowedworkingDir- Directory where the commands are executedinputPrintAction- Function for printing the output of the executionerrorPrintAction- Function for printing output of execution errors
-