Anyone familiar with creating `Gradle Plugin`s?
I'm trying to do something on closure.
Copy code
plugins {
id("my-plugin")
}
myPluginExtension {
// Configure it
}
// I'm trying to ensure that at this line here in the build.gradle(kts) file (after closure), everything gets configured
Copy code
open class MyPlugin: Plugin<Project> {
override fun apply(target: Project) {
val extension = target.extensions.create(
"myPluginExtension",
MyPluginExtension::class.java,
target,
)
// What I'm trying to do, much like an action
// that gets lazily invoked.
extension.afterClosure { it ->
it.configure()
}
}
private val MyPluginExtension.configure() {
// setup
}
}