This repository was archived by the owner on Dec 3, 2025. It is now read-only.

Description
Improve the usability of builtin plugins by providing extension members that can be used in the scope of the plugins block:
plugins {
java
application
}
This should give users the following benefits:
- content-assist for applying plugins (typing
<CTRL+SPACE> within the plugins block would cause the IDE to present a list of available plugins)
- a starting point for navigating their docs directly in the IDE
A standalone Kotlin example
fun buildscript() {
plugins {
java
application
}
}
// Plugins block
fun plugins(setup: PluginsBlock.() -> Unit) {
}
class PluginsBlock {
fun id(id: String): PluginId = PluginId(id)
}
data class PluginId(val id: String)
// Builtin plugin ids as extension members
val PluginsBlock.java: PluginId
get() = id("java")
val PluginsBlock.application: PluginId
get() = id("application")
Alternatively an infix + operator could be used as syntactic hook if the UX is considerably improved:
class PluginBlock { // same as above plus
// Provides a syntactic hook for content-assist
operator fun PluginId.unaryPlus(): PluginId = this
}
plugins {
+application
}