Can't change a configuration which is not in unresolved state

First off, I’m aware that this question has been asked a few times already however the answers do not fit my scenario :frowning:

The following plugin defines two configurations: compileOnly and testCompileOnly. The proceeds to add a few dependencies to them, as every Griffon project requires them by default

A brand new Griffon project gets initialized using a Lazybones template, which results in the following build file

As you can see, this build adds more dependencies to the custom configurations created by the plugin. Now for the odd part. If this build is run with Gradle 1.12 then everything works, but it fails with Gradle 2.0-rc-1 with the aforementioned problem.

So my question is, how can a plugin add a custom configuration with some default dependencies while at the same time allowing developers to define more dependencies on those configurations?

TIA Andres

Previous answers:

Chances are that ‘collection += element’ has to be changed to ‘collection += [element]’ somewhere due to an incompatible change wrt. ‘+=’ in Groovy.

Thank you Peter, this solves the problem though the reasoning behind the fix was not apparent to me. Must go back to re-learn Groovy :wink: