Slackbot
04/05/2023, 2:16 PMAdam
04/05/2023, 2:22 PMalias(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
.Chris Lee
04/05/2023, 2:22 PMalias(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.Adam
04/05/2023, 2:25 PMIgor Wojda
04/05/2023, 2:52 PMalias(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
> 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:
Adam
04/05/2023, 2:55 PMalias(libs.plugins.kotlin.plugin.jpa)
in buildSrc might also bring along the Kotlin JVM pluginAdam
04/05/2023, 2:55 PMkotlin-dsl
and the code-analysis plugins
// buildSrc/build.gradle.kts
plugins {
`kotlin-dsl`
alias(libs.plugins.spotless)
alias(libs.plugins.detekt)
}
Chris Lee
04/05/2023, 3:16 PMkotlin-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")
Igor Wojda
04/05/2023, 5:16 PM