I've filed an issue and included a demo project: <...
# gradle
c
I've filed an issue and included a demo project: https://github.com/gradle/kotlin-dsl/issues/590
b
Hi Alexander, looking at the referenced build script I see that it is using the
kotlin-dsl
plugin: https://github.com/AlexCzar/bad-gradle-import/blob/master/build.gradle.kts#L20
The
kotlin-dsl
does add Gradle API jars to the classpath because it is meant for Gradle plugin projects (such as
buildSrc
, for example)
Allowing such projects to use most of the same DSL available to build scripts
Looking at the sources it doesn’t seem like that project needs those capabilities
c
Oh, I see! So, it's mea culpa after all. I was wondering how can it be that I'm the first one who noticed such a major bug 😄 What is the proper way to declare the plugin in
plugins {}
block?
b
The declarations look good except for
kotlin-dsl
, removing it should restore the behaviour of not adding Gradle API jars to the classpath
Ah, I get it
You want to use the
kotlin("jvm") version "1.1.51"
plugin, which is the latest stable Kotlin language plugin
kotlin-dsl
as I explained is for Gradle plugin projects
c
Thanks! Totally missed that for some reason! Sanity restored 🙂
b
Great 👍