Gradle 2.12 stalls with recursive configurations

issue-resolved

(Raymond Chiu) #1

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)
}
}


(Stefan Wolf) #2

Hi Raymond,

thanks for the report. I did try it with Gradle 3.0-rc-1 and it seems to be fixed: https://e.grdev.net/s/on532m2u5f246

I could reproduce the problem with Gradle 2.14.1 (scan is for count = 11): https://e.grdev.net/s/npw3rkkp63toc

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

Cheers,
Stefan


(Raymond Chiu) #3

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