void ( @NotNull TestLauncher testLauncher, @NotNull GradleCommandLine commandLine ) { for (var task : commandLine.getTasks()) { var patterns = GradleCommandLineUtil.getTestPatterns(task); if (!patterns.isEmpty()) { testLauncher.withTestsFor( it -> it.forTaskPath(task.getName()) .includePatterns(patterns) ); } else { testLauncher.forTasks(ArrayUtil.toStringArray(task.getTokens())); } } testLauncher.withArguments(commandLine.getOptions().getTokens()); }