It took me a couple of hours to get the right configuration, with a lot of trial and error.
This is what I came up with: I had to exclude a couple of transient dependencies globally.
Include these excludes in your configurations block:
configurations {
configureEach {
exclude group: 'commons-logging', module: 'commons-logging'
exclude group: 'org.neo4j', module: 'neo4j-logging'
exclude group: 'ch.qos.logback', module: 'logback-classic'
}
}
I did not find a way to exclude those packages only for the tests, but I guess that's not a problem. The first exclude is not strictly necessary for my project to work, but it makes the warning about commons-logging.jar go away.
So I had to use configureEach
to remove the dependencys from all scopes, because removing if from testRuntimeOnly
or other test scopes did not work for some reason.