Let say, I have project A with configuration like this:
apply plugin: 'java'
apply plugin: 'idea'
dependencies {
runtime name: 'somelib'
}
And a project B:
apply plugin: 'java'
apply plugin: 'idea'
dependencies {
compile project(':A')
}
In project B there is a class that imports and uses some class from somelib.
When I build the whole project using ‘gradle build’, it compiles (so, I understand that somelib was included in the compile process, because A is a compile dependency of B).
When I generate the IDEA config (using the Gradle’s idea plugin) and build it using IDEA, it doesn’t compile (so, I understand that IDEA treats the somelib dependency as runtime-only dependency and doesn’t include it in the compilation).
I don’t know which one of those 2 behaviours is the correct one, but for sure they should be consistent.