I have got a gradle project (gradle 2.0), with multiple sub-projects, and I am adding a new sub-project (which in it self is having sub-projects) and the settings.gradle looks something like -
include ':subproject-a',
':subproject-b',
...
...
':my_new_sub_project-rohan',
':my_new_sub_project-rohan:abc-rohan',
':my_new_sub_project-rohan:xyz-rohan'
The root build.gradle is adding a org.codehaus.jackson module dependency, coming from a predefined configuration TestConfig
Root level build.gradle >>
allprojects {
integTestCompile configurations.TestConfig
//all other dependencies and configurations are applied to all sub-projects in integTestCompile
}
Now as part of my subproject - “my_new_sub_project-rohan”, I want to exclude the entire module org.codehaus.jackson, but even after writing the below exclude statement, it is not getting excluded.
my_new_sub_project-rohan level build.gradle >>
subprojects {
configure ( subprojects.findAll {}) {
afterEvaluate {
configurations.all {
exclude group: 'org.codehaus.jackson', module: 'jackson-core-asl'
exclude group: 'org.codehaus.jackson', module: 'jackson-mapper-asl'
}
}
}
}
But even then, this module is getting added to classpath. I checked by running
$> gradle dependencies
and this org.codehuas.jackson module still listed there.
Any inputs on something I am doing incorrectly or may be on how to achieve the exclusion ?
Thanks. Appreciate any inputs.