Ad
How To Exclude Library From All Dependencies In Kotlin DSL Build.gradle?
I started migration from build.gradle
(Groovy) to build.gradle.kts
(Kotlin DSL). The thing is that com.google.common.util.concurrent.ListenableFuture
(from com.google.guava
) exists in several dependecies. Because of that build fails with java.lang.RuntimeException: Duplicate class ...
error.
Previously (when I had build.gradle
in Groovy) this problem was solved with this snippet:
configurations {
all*.exclude group: 'com.google.guava', module: 'listenablefuture'
}
But I can't find anything similar using Kotlin DSL. Could you please provide Kotlin alternative for the snippet above or suggest any other solution on how to deal with this?
Ad
Answer
This might work (though I haven't tried it):
configurations.forEach { it.exclude("com.google.guava", "listenablefuture") }
Ad
source: stackoverflow.com
Related Questions
- → should I choose reactjs+f7 or f7+vue.js?
- → Phonegap Android write to sd card
- → Local reference jquery script in nanohttpd (Android)
- → Click to navigate on mobile devices
- → How to allow api access to android or ios app only(laravel)?
- → Access the Camera and CameraRoll on Android using React Native?
- → React native change listening port
- → What is the default unit of style in React Native?
- → Google play market autocomplete icon
- → Warning: Each child in an array or iterator should have a unique "key" prop. Check the render method of `ListView`
- → Using Laravel with Genymotion
- → react native using like web-based ajax function
- → react native pdf View
Ad