From f4ada5289119f36c0aede9ea7bf9a8ddb15e39b2 Mon Sep 17 00:00:00 2001 From: Sterling Greene Date: Wed, 5 Sep 2018 15:15:57 -0400 Subject: [PATCH] Reproduce failure in https://github.com/gradle/gradle/issues/6558 --- .../scala/ScalaPluginIntegrationTest.groovy | 47 ++++++++++++++++++- 1 file changed, 46 insertions(+), 1 deletion(-) diff --git a/subprojects/scala/src/integTest/groovy/org/gradle/scala/ScalaPluginIntegrationTest.groovy b/subprojects/scala/src/integTest/groovy/org/gradle/scala/ScalaPluginIntegrationTest.groovy index 05b5813a8458..898f00937c4e 100644 --- a/subprojects/scala/src/integTest/groovy/org/gradle/scala/ScalaPluginIntegrationTest.groovy +++ b/subprojects/scala/src/integTest/groovy/org/gradle/scala/ScalaPluginIntegrationTest.groovy @@ -16,6 +16,7 @@ package org.gradle.scala import org.gradle.integtests.fixtures.AbstractIntegrationSpec +import spock.lang.Ignore import spock.lang.Issue class ScalaPluginIntegrationTest extends AbstractIntegrationSpec { @@ -30,4 +31,48 @@ task someTask expect: succeeds("someTask") } -} \ No newline at end of file + + @Ignore("this will sometimes fail/sometimes pass") + @Issue("https://github.com/gradle/gradle/issues/6558") + def "can build in parallel with lazy tasks"() { + settingsFile << """ + include 'a', 'b', 'c', 'd' + """ + buildFile << """ + allprojects { + repositories { + ${jcenterRepository()} + } + plugins.withId("scala") { + dependencies { + compile("org.scala-lang:scala-library:2.12.6") + } + tasks.withType(ScalaCompile).configureEach { + + } + } + } + """ + ['a', 'b', 'c', 'd'].each { project -> + file("${project}/build.gradle") << """ + plugins { + id 'scala' + } + """ + file("${project}/src/main/scala/${project}/${project.toUpperCase()}.scala") << """ + package ${project} + trait ${project.toUpperCase()} + """ + } + file("a/build.gradle") << """ + dependencies { + compile(project(":b")) + compile(project(":c")) + compile(project(":d")) + } + """ + + expect: + succeeds(":a:classes", "--parallel") + } +}