I figured out my mistake. It was not working as I had defined some dependencies as compile and runtime which were dependencies of a project too which was defined as provided dependency.
As we are extending compile from provided, do we still need to define these configurations?
sourceSets {
main {
compileClasspath += configurations.provided
} }
eclipse {
classpath {
plusConfigurations += [ configurations.provided ]
} }