【问题标题】:gradle kotlin DSL extendsfromgradle kotlin DSL 扩展自
【发布时间】:2020-06-18 14:19:41
【问题描述】:

我该如何重新表述:

testCompile.extendsFrom compileOnly

Gradle Groovy DSL 与其基于 Kotlin 的等价物?

configurations {
        testCompile{
            extendsFrom(compileOnly)
        }
    }

我上面的方法失败了。

【问题讨论】:

    标签: kotlin gradle build gradle-kotlin-dsl kotlin-dsl


    【解决方案1】:
    configurations {
            create("testCompile").apply {
                extendsFrom(configurations.compileOnly.get())
            }
        }
    

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

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2020-12-29
      • 1970-01-01
      • 2019-09-15
      • 1970-01-01
      • 1970-01-01
      • 2019-03-22
      • 2018-11-05
      • 2019-04-06
      相关资源
      最近更新 更多