public TaskNameResolvingBuildConfigurationAction(CommandLineTaskParser commandLineTaskParser) {
this.commandLineTaskParser = commandLineTaskParser;
}
public void configure(BuildExecutionContext context) {
GradleInternal gradle = context.getGradle();
TaskGraphExecuter executer = gradle.getTaskGraph();
List<TaskExecutionRequest> taskParameters = gradle.getStartParameter().getTaskRequests();
for (TaskExecutionRequest taskParameter : taskParameters) {
List<TaskSelector.TaskSelection> taskSelections = commandLineTaskParser.parseTasks(taskParameter);
for (TaskSelector.TaskSelection taskSelection : taskSelections) {
LOGGER.info("Selected primary task '{}' from project {}", taskSelection.getTaskName(), taskSelection.getProjectPath());
executer.addTasks(taskSelection.getTasks());