Gradle 2.0 , Error:You can't change configuration 'provided' because it is already resolved!

Im trying to upgrade gradle to 2.0 ,im facing issues with gradle In Build script, its given as

provided ‘javax.enterprise:cdi-api:1.0’ Build fails with an exception

You can’t change configuration ‘provided’ because it is already resolved!

Can any one please help me

Maybe a snippet of the build file would help to provide some context

Its possible you are trying to change the ‘configuration.provided’ object inside of a ‘doLast’ or ‘doFirst’ block. Also make sure you did not accidentally add a ‘<<’ (left-shift) at the top of your task definition when you are trying to configure the task. This is the same as a ‘doLast’.

You could be hitting GRADLE-3101, also documented in the Gradle 2.0 release notes

This will happen if you’re using the ‘+=’ operator to modify IDEA scopes, or if you’re using a plugin that does so. (I think some popular 3rd party plugins were using this syntax).