Exclude slf4j with the exclude rule to exclude transitive dependencies for all dependencies of this configuration
configurations.all {
exclude group: 'org.slf4j', module: 'slf4j-api'
}
allprojects {
configurations.all {
exclude group: 'org.slf4j', module: 'slf4j-api'
}
}