gradle kotlin DSL 扩展自

Geo*_*ler 1 build gradle kotlin gradle-kotlin-dsl kotlin-dsl

我该如何重新表述:

testCompile.extendsFrom compileOnly
Run Code Online (Sandbox Code Playgroud)

Gradle Groovy DSL 与其基于 Kotlin 的等效项?

configurations {
        testCompile{
            extendsFrom(compileOnly)
        }
    }
Run Code Online (Sandbox Code Playgroud)

我上面的方法失败了。

Geo*_*ler 5

configurations {
        create("testCompile").apply {
            extendsFrom(configurations.compileOnly.get())
        }
    }
Run Code Online (Sandbox Code Playgroud)

https://github.com/spring-projects/spring-boot/issues/16251