Using Version Catalogs with Precompiled Script Plugins

Suppose I have a precompiled script plugin which contains something like

plugins {
    // Picking a random plugin out of a hat here

And suppose in the project I have a version catalog like so:

# Version omitted for the sake of an example

According to the instructions, I need to declare this plugin as an implementation dependency in order for the precompiled script plugin to function properly. Given the catalog above, how would I populate the dependencies block in my build.gradle.kts?


So hopefully in 8.3 there is a built-in way.

In the meantime you can use a manual work-around like

dependencies {

val Provider<PluginDependency>.dependency
    get() = map { "${it.pluginId}:${it.pluginId}.gradle.plugin:${it.version}" }