Gradle and provided configuration

Hello, I am using IntelliJ, Gradle, and Lombok. Lombok is a compiler plugin so it needs to be registered as "provided". IntelliJ perfectly recognized this "provided" configuration until last 13.1.3 release. The dependency isn't even added in Libraries. I had to manually add it to each modules to make this work again. Is this a bug from IntelliJ, or what ?

Comment actions Permalink

How did you define you "provided" configuration?

There is War plugin which adds two dependency configurations:

. IDEA supports it out-of the box.
But if you define you custom provided configuration, e.g. with name "provided", you need to tell about it explicitly.
configurations {
apply plugin: 'idea'
idea {
     module { += configurations.provided

In previous builds there was default assumption about gradle configuration with the name "provided" that was confusing for some users.

Comment actions Permalink

Thank you, Vladislav.
Your answer helped me!

Comment actions Permalink

Me too, this resolved my problem ! Thank you !

Comment actions Permalink

Unfortunately this doesn't work with Intellij 13.1.4 and Gradle 2.0.

I get:

Error:(4, 0) You can't change configuration 'provided' because it is already resolved!

when trying to refresh the gradle tasks.

Mark Thornton


Please sign in to leave a comment.