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 ?

5 comments

How did you define you "provided" configuration?

There is War plugin which adds two dependency configurations:

providedCompile
and
providedRuntime
. 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 {
    provided
    provided.extendsFrom(compile)
}
apply plugin: 'idea'
idea {
     module {
         scopes.PROVIDED.plus += configurations.provided
     } 
}


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

0

Thank you, Vladislav.
Your answer helped me!

0

Me too, this resolved my problem ! Thank you !


0

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

0

Please sign in to leave a comment.