com.gradle.publish.PluginBundleExtension usability issue for Gradle Kotlin DSL

I don’t know the right place to report issues with the com.uptake type plugins because they aren’t available on GitHub, so I’m trying here.

The com.gradle.publish.PluginBundleExtension has a public void plugins(Closure<?> block) which doesn’t works so well for Gradle Kotlin DSL. Could it be updated to use Action instead to get a better DSL?

Thanks!

Hi @mkobit,

In the meantime, PluginBundleExtension#plugins can be configured from Kotlin with the following trick:

pluginBundle {
    (plugins) { // <= the trick
        "myPlugin" {
            id = "myPlugin"
            // etc
        }
    }
}

The trick should work with any NamedDomainObjectContainer<*> property.

Kind regards,
Rodrigo

1 Like

More idiomatic support was added in 0.9.10 - see PLUGIN AUTHORS: v0.9.10 of the plugin-publish plugin released with Kotlin DSL support