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

plugins

(Mike Kobit) #1

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!


Com.gradle.plugin-publish does not respect new Java Library configurations
(Rodrigo B. de Oliveira) #2

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


(Mike Kobit) #3

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