[GRADLE-2477] support nested configuration resolution Created: 13/Sep/12  Updated: 12/Feb/13  Resolved: 12/Feb/13

Status: Resolved
Project: Gradle
Affects Version/s: 1.2
Fix Version/s: 1.5-rc-1

Type: Bug
Reporter: Matthieu Leclercq Assignee: Szczepan Faber
Resolution: Fixed Votes: 0


 Description   

If a dependency resolution trigger another dependency resolution, the org.gradle.initialization.DependencyResolutionLogger class throw an IllegalStateException.

This happen for instance with the following script

repositories {
	flatDir {
		dirs "."
	}
}

configurations {
	fragments
}

repositories {
	flatDir {
		dirs configurations.fragments
	}
}

configurations {
	compile
}

dependencies {
	compile name:'foo'
}

task foo << {
	println configurations.compile.files
}

Mainly the directories of a flatDir repository are resolved as dependencies.

Running gradle foo throws an IllegalStateException

If the fragments configuration is resolved "a-priori", it works correctly. For instance by adding to the script:

afterEvaluate {
	configurations.fragments.files
}

Generated at Wed Jun 30 12:23:01 CDT 2021 using Jira 8.4.2#804003-sha1:d21414fc212e3af190e92c2d2ac41299b89402cf.