How to include jars for test runtime which are excluded at project level


(Sony Thomas) #1

Hi,

I am working on a project and I have added exclusion for 5 libraries at configurations level. my configuration section look like this.

configurations {
checkstyleOverride
integrationTestCompile.extendsFrom testCompile
integrationTestRuntime.extendsFrom testRuntime
jacoco
jacocoRuntime
configurations.compile.exclude module: 'jackson-databind’
** configurations.compile.exclude module: “logback-classic”**
** configurations.compile.exclude module: “jul-to-slf4j”**
** configurations.compile.exclude module: “jcl-over-slf4j”**
** configurations.compile.exclude module: “slf4j-api”**
}

Because of exclusion my test cases start to fail. I want to include these jars for my tests to run. I have tried runtime and testRuntime in dependencies section to include those excluded files to include for tests without much luck. can someone give some light how this can be achieved in gradle scripts ?

Thanks & Regards,

Sony