Gradle 2.12 stalls with recursive configurations

Gradle Version: 2.12
Operating System: Linux
Regression: Yes, last working version is 2.11

Gradle takes forever to configure when Configuration extendsFrom other Configuration recusively. Below is a build.gradle that reproduces the problem. On Gradle 2.11, running “gradle help” finishes quickly, whereas starting from 2.12, it will get stuck.

apply plugin: “java”

def count = 20
def ss = []
for (int i = 0; i < count; i++) {
ss.add(sourceSets.create(“ss” + i))

for (int i = 0; i < count; i++) {
if (i != 0) {
def config = “ss” + i + "Compile"
project.getDependencies().add(config, ss[i-1].output)
project.getDependencies().add(config, ss[i-1].compileClasspath)

Hi Raymond,

thanks for the report. I did try it with Gradle 3.0-rc-1 and it seems to be fixed:

I could reproduce the problem with Gradle 2.14.1 (scan is for count = 11):

Can you confirm this is fixed with 3.0-rc-1?


Yes, confirmed to be fixed in 3.0-rc-1.