AndroidGradleTaskManager implements GradleTaskManagerExtension { @Override public boolean executeTasks(@NotNull ExternalSystemTaskId id, @NotNull List<String> taskNames, @NotNull String projectPath, @Nullable GradleExecutionSettings settings, @NotNull List<String> vmOptions, @NotNull List<String> scriptParameters, @Nullable String debuggerSetup, @NotNull ExternalSystemTaskNotificationListener listener) throws ExternalSystemException { GradleExecutionSettings effectiveSettings = settings == null ? new GradleExecutionSettings(null, null, DistributionType.BUNDLED, false) : settings; effectiveSettings .withVmOptions(vmOptions) .withArguments(scriptParameters); return executeTasks(id, taskNames, projectPath, effectiveSettings, debuggerSetup, listener); }  @Override boolean executeTasks(@NotNull ExternalSystemTaskId id,
                              @NotNull List<String> taskNames,
                              @NotNull String projectPath,
                              @Nullable GradleExecutionSettings settings,
                              @NotNull List<String> vmOptions,
                              @NotNull List<String> scriptParameters,
                              @Nullable String debuggerSetup,
                              @NotNull ExternalSystemTaskNotificationListener listener); @Override boolean executeTasks(@NotNull final ExternalSystemTaskId id,
                              @NotNull final List<String> taskNames,
                              @NotNull String projectPath,
                              @Nullable GradleExecutionSettings settings,
                              @Nullable final String jvmParametersSetup,
                              @NotNull final ExternalSystemTaskNotificationListener listener); @Override boolean cancelTask(@NotNull ExternalSystemTaskId id, @NotNull ExternalSystemTaskNotificationListener listener);  }
@Test public void executeTasks() { String projectPath = "projectPath"; List<String> taskNames = Arrays.asList("fooTask"); ExternalSystemTaskId taskId = mock(ExternalSystemTaskId.class); Project project = mock(Project.class); GradleBuildInvoker gradleBuildInvoker = createInvokerMock(projectPath, taskId, project); ExternalSystemTaskNotificationListenerAdapter listener = new ExternalSystemTaskNotificationListenerAdapter() {}; }