If I have a `Provider<PluginDependency>` (eg...
# community-support
l
If I have a
Provider<PluginDependency>
(eg
<http://libs.plugins.com|libs.plugins.com>.example.some.plugin
) how can I convert this into something suitable to give to
implementation()
? This...
Copy code
implementation(libs.plugins.com.example.some.plugin)
...fails with:
Cannot convert the provided notation to an object of type Dependency: libs.plugins.com.example.some.plugin:1.2.3
l
Thanks! Based on the comments in that first one I wrote:
Copy code
fun Provider<PluginDependency>.asDependency() =
    map { it.asDependency() }

fun PluginDependency.asDependency() : String =
    "$pluginId:$pluginId.gradle.plugin:${version.displayName}"
Which can be used like:
Copy code
dependencies {
    implementation(libs.plugins.org.jlleitschuh.gradle.ktlint.asDependency())
}