sid
06/03/2024, 8:18 PM# In libs.versions.toml
[plugins]
kotlin-dsl = { id = "org.gradle.kotlin.kotlin-dsl" }
// In build.gradle.kts
plugins {
alias(libs.plugins.kotlin.dsl) apply true
}
However, when building, Gradle outputs:
* What went wrong:
Plugin [id: 'org.gradle.kotlin.kotlin-dsl'] was not found in any of the following sources:
- Gradle Core Plugins (plugin is not in 'org.gradle' namespace)
- Included Builds (No included builds contain this plugin)
- Plugin Repositories (plugin dependency must include a version number for this source)
And when I come back with the version, it works properly. I was wondering if this was about plugin management dependency resolution, so I tried the following:
// In settings.gradle.kts
pluginManagement {
repositories { gradlePluginPortal() }
}
Yet, nothing happens. Does anyone have an ideia what I am missing? Thanks in advanceVampire
06/03/2024, 8:27 PMkotlin-dsl
plugin is not a built- in plugin. It has a convenience syntax that applies it with the correct version for the current Gradle version. But if you try to apply it without version, that doesn't workVampire
06/03/2024, 8:29 PMbuildSrc
or an included build, it would work without version.sid
06/03/2024, 8:30 PM