boolean ( @NotNull ExternalSystemTaskId id, @NotNull String projectPath, @NotNull List<String> tasksAndArguments, @NotNull GradleExecutionSettings settings, @Nullable GradleVersion gradleVersion ) { if (!Registry.is("gradle.testLauncherAPI.enabled")) { LOG.debug("TestLauncher isn't applicable: disabled by registry"); return false; } if (!settings.isTestTaskRerun()) { LOG.debug("TestLauncher isn't applicable: RC doesn't expect task rerun"); return false; } if (gradleVersion == null || isGradleOlderThan(gradleVersion, "8.3")) { LOG.debug("TestLauncher isn't applicable: unsupported Gradle version " + gradleVersion); return false; } var project = id.findProject(); if (project == null) { LOG.debug("TestLauncher isn't applicable: Project is already closed"); return false; } var commandLine = GradleCommandLineUtil.parseCommandLine(tasksAndArguments, settings.getArguments()); if (!hasJvmTestTasks(commandLine, project, projectPath)) { LOG.debug("TestLauncher isn't applicable: RC hasn't JVM test tasks"); return false; } if (hasNonJvmTestTasks(commandLine, project, projectPath)) { LOG.debug("TestLauncher isn't applicable: RC has non-JVM test tasks"); return false; } if (hasNonTestOptions(commandLine)) { LOG.debug("TestLauncher isn't applicable: RC tasks have non-test options"); return false; } if (hasUnrecognizedOptions(commandLine)) { LOG.debug("TestLauncher isn't applicable: RC has unrecognized options"); return false; } LOG.debug("TestLauncher is applicable"); return true; }