This message was deleted.
# community-support
s
This message was deleted.
a
tldr: remove
alias(libs.plugins.kotlin.jvm)
from `buildSrc/build.gradle.kts`’s plugins block. The
kotlin-dsl
plugin already applies the Kotlin plugin that’s embedded into Gradle. Applying the Kotlin plugin twice is probably going to be okay, but it might cause weird issues. So only apply
kotlin-dsl
.
👆 1
c
you’ve mixed kotlin-dsl and kotlin-jvm plugins:
Copy code
alias(libs.plugins.kotlin.jvm)
    `kotlin-dsl`
That should never be the case.
kotlin-dsl
is for building a gradle plugin (in Kotlin),
kotlin-jvm
is for your application code.
1
i
So I have removd
alias(libs.plugins.kotlin.jvm)
from
build.gradle.kts
plugins
block, but the warning is still there. After removing it from dependencies block my build fails as some of the custom conventions plugins are depending on
org.jetbrains.kotlin.jvm
Copy code
> Task :buildSrc:generatePrecompiledScriptPluginAccessors FAILED
4 actionable tasks: 3 executed, 1 up-to-date

FAILURE: Build failed with an exception.

* Where:
Precompiled script plugin '/Users/igorwojda/IdeaProjects/mango/buildSrc/src/main/kotlin/local.base.gradle.kts' line: 1

* What went wrong:
Plugin [id: 'org.jetbrains.kotlin.jvm'] was not found in any of the following sources:
a
possibly applying this plugin
alias(libs.plugins.kotlin.plugin.jpa)
in buildSrc might also bring along the Kotlin JVM plugin
in fact, I think you can probably remove all plugins except for
kotlin-dsl
and the code-analysis plugins
Copy code
// buildSrc/build.gradle.kts

plugins {
    `kotlin-dsl`

    alias(libs.plugins.spotless)
    alias(libs.plugins.detekt)
}
👆 2
c
it’s possible the issue is wider-spread than just buildSrc/build.gradle.kts - if there are precompiled script plugins that, by themselves or in conjunction with other plugins applied, also apply that combination of plugins
kotlin-dsl
and
kotlin("jvm")
. Your buildSrc stuff should solely use
kotlin-dsl
. Unless your convention plugins and the projects using them are also building plugins they should likely use
kotlin("jvm")
i
Good tips I have cleaned up rest of the plugins and updated config. Thx everyone for help
👍 1