import org.gradle.util.GradleVersion // Only run against root build. Do not run against included builds. def isTopLevelBuild = gradle.getParent() == null // Only record configuration-cache entries for Gradle 7+ def isAtLeastGradle7 = GradleVersion.current() >= GradleVersion.version('7.0') if (isTopLevelBuild && isAtLeastGradle7) { apply from: 'project-root-capture.plugin.groovy' }