gradle-plugins icon indicating copy to clipboard operation
gradle-plugins copied to clipboard

Support for typesafe `jdk` accessor when using Kotlin DSL

Open hakanai opened this issue 2 years ago • 0 comments

In a build using Kotlin DSL, we had tried this:

plugins {
    id("com.github.rmee.jdk-bootstrap")
}

jdk {
    allowOverride = false
    // ...
}

When we tried to build, it said it couldn't find the declaration for jdk.

The workaround we're using for the time being is the longer form:

configure<JdkBootstrapExtension> {
    allowOverride = false
    // ...
}

I have no idea how Kotlin DSL accessors get generated for plugins, but there must be something extra needed to make them work.

Versions in use:

  • jdk-bootstrap plugin 1.1.20200614081240
  • Gradle 6.8

hakanai avatar Aug 17 '22 05:08 hakanai