void (@NotNull GradleExecutionSettings executionSettings, @NotNull DefaultProjectResolverContext resolverCtx, boolean isBuildSrcProject) { executionSettings.withArgument("-Didea.gradle.download.sources=" + executionSettings.isDownloadSources()); executionSettings.withArgument("-Didea.sync.active=true"); if (resolverCtx.isResolveModulePerSourceSet()) { executionSettings.withArgument("-Didea.resolveSourceSetDependencies=true"); } if (executionSettings.isParallelModelFetch() && isGradleVersionAtLeast("7.4", resolverCtx)) { executionSettings.withArgument("-Didea.parallelModelFetch.enabled=true"); } if (!isBuildSrcProject) { for (GradleBuildParticipant buildParticipant : executionSettings.getExecutionWorkspace().getBuildParticipants()) { executionSettings.withArguments(GradleConstants.INCLUDE_BUILD_CMD_OPTION, buildParticipant.getProjectPath()); } } GradleImportCustomizer importCustomizer = GradleImportCustomizer.get(); GradleProjectResolverUtil.createProjectResolvers(resolverCtx).forEachOrdered(extension -> { if (importCustomizer == null || importCustomizer.useExtraJvmArgs()) { // collect extra JVM arguments provided by gradle project resolver extensions ParametersList parametersList = new ParametersList(); for (Pair<String, String> jvmArg : extension.getExtraJvmArgs()) { parametersList.addProperty(jvmArg.first, jvmArg.second); } executionSettings.withVmOptions(parametersList.getParameters()); } // collect extra command-line arguments executionSettings.withArguments(extension.getExtraCommandLineArgs()); }); }