List<Project> (@NotNull Gradle gradle) { List<Project> result = new ArrayList<>(); for (IncludedBuild includedBuild : gradle.getIncludedBuilds()) { Object unwrapped = maybeUnwrapIncludedBuildInternal(includedBuild); if (unwrapped instanceof DefaultIncludedBuild) { DefaultIncludedBuild build = (DefaultIncludedBuild)unwrapped; if (is73OrBetter) { build.ensureProjectsConfigured(); } if (is51OrBetter) { result.addAll(build.withState( it -> it.getRootProject().getAllprojects() )); } else { result.addAll(getProjectsWithReflection(build)); } } } return result; }