Is it possible to extract gradle plugin dependenci...
# gradle
i
Is it possible to extract gradle plugin dependencies with their versions into separate variables? Now
Copy code
//custom objects in gradle buildSrc (to have dependency autocompletion)
object GradlePluginVersion {
    const val detekt = "1.0.0.RC7"
}

object GradlePluginId {
    const val detekt = "io.gitlab.arturbosch.detekt"
}
Copy code
//build.gradle
plugins {
    id(GradlePluginId.detekt) version GradlePluginVersion.detekt
}
Want
Copy code
//build.gradle
plugins {
    GradlePluginDependency.detekt
}
The issue I have is that
plugin
DSL expect
PluginDependenciesSpec
with is an interface, not a concrete class 🤔
s
If you can live with
Copy code
//build.gradle
plugins {
    GradlePluginDependency.detekt()
}
Then you can extract it to a
PluginDependenciesSpec.() -> Unit
Or I expect it to be possible. Not using gradlekt, just a lurker.
i
Thanks @spand