Merge pull request #14935 from gradle/bamboo/cc/scopeids/i

Make `ScopeIdsFixture` compatible with Gradle 4.0+
diff --git a/subprojects/core/src/crossVersionTest/groovy/org/gradle/internal/scopeids/CrossVersionScopeIdsIntegrationTest.groovy b/subprojects/core/src/crossVersionTest/groovy/org/gradle/internal/scopeids/CrossVersionScopeIdsIntegrationTest.groovy
index 755fad2..c0cee95 100644
--- a/subprojects/core/src/crossVersionTest/groovy/org/gradle/internal/scopeids/CrossVersionScopeIdsIntegrationTest.groovy
+++ b/subprojects/core/src/crossVersionTest/groovy/org/gradle/internal/scopeids/CrossVersionScopeIdsIntegrationTest.groovy
@@ -21,7 +21,7 @@
 import org.gradle.integtests.fixtures.TargetVersions
 import org.junit.Rule
 
-@TargetVersions("4.10+")
+@TargetVersions("4.0+")
 class CrossVersionScopeIdsIntegrationTest extends CrossVersionIntegrationSpec {
 
     def currentExecuter = version(current)
diff --git a/subprojects/internal-integ-testing/src/main/groovy/org/gradle/integtests/fixtures/ScopeIdsFixture.groovy b/subprojects/internal-integ-testing/src/main/groovy/org/gradle/integtests/fixtures/ScopeIdsFixture.groovy
index 15578b5..6f0f2b6 100644
--- a/subprojects/internal-integ-testing/src/main/groovy/org/gradle/integtests/fixtures/ScopeIdsFixture.groovy
+++ b/subprojects/internal-integ-testing/src/main/groovy/org/gradle/integtests/fixtures/ScopeIdsFixture.groovy
@@ -117,12 +117,12 @@
             }
 
             rootProject {
-                def collector = tasks.register("collectScopeIds", CollectScopeIds) {
+                task collectScopeIds(type: CollectScopeIds) {
                     outputJsonFile = new File("${normaliseFileSeparators(idsFile.absolutePath)}")
                 }
-                tasks.withType(DefaultTask).configureEach {
+                tasks.withType(DefaultTask) {
                     if (name != "collectScopeIds") {
-                        dependsOn collector
+                        dependsOn collectScopeIds
                     }
                 }
             }