Gradle adds a bunch of gradle jars to classpath when build file written in kotlin-dsl and does not when it's written in groovy. This sometimes causes conflicts. E.g. if I have logback-classic dependency it conflicts with slf4j static binding in gradle-api jar.
gradle jars should not be added to application class path
gradle jars are added to application class path which prevents it from running
Demo project: https://github.com/AlexCzar/bad-gradle-import
See readme in the demo project (basically: clone and run build)
Gradle version: 4.3.1 with its own kotlin-dsl (also affects 4.2.1, I haven't tested lower versions)
OS: Linux 64bit (probably irrelevant, but I don't have Win to test that)
Oops, my bad, should have used kotlin("jvm") version "1.1.51" instead of kotlin-dsl, former being a prerequisite for creating gradle plugins.
This can be closed/deleted as invalid.
No worries, @AlexCzar. Thanks for the feedback.
Closing as answered.
I'm experiencing this also - however I think my use is valid (pretty much exactly like this sample project: https://github.com/gradle/kotlin-dsl/tree/master/samples/multi-project-with-buildSrc). In buildSrc I have kotlin-dsl applied to develop a plugin, then in one of my project's modules, I'm getting the slf4j dependency conflict because gradle-api is on the classpath.
Most helpful comment
I'm experiencing this also - however I think my use is valid (pretty much exactly like this sample project: https://github.com/gradle/kotlin-dsl/tree/master/samples/multi-project-with-buildSrc). In buildSrc I have kotlin-dsl applied to develop a plugin, then in one of my project's modules, I'm getting the slf4j dependency conflict because gradle-api is on the classpath.