Resolved configurations can be modified in a multi-project build


(Scott Palmer) #1

Normally if you attempt to change a configuration that has been resolved you get an error message:

“You can’t change a configuration which is not in unresolved state”

However, in multi-project builds you can change a configuration defined in one project, after a down-stream project has already resolved it. This results in a confusing state where some projects see the old configuration and some see the new one.

I discovered this after spending a lot of time trying to debug why when I replaced my default artifact it wasn’t getting picked up by some downstream projects. See http://forums.gradle.org/gradle/topics/how_do_you_change_the_default_artifact_in_a_multi_project_build