gradle kotlin DSL extendsfrom

橙三吉。 提交于 2020-08-10 20:13:27

问题


How can I reformulate:

testCompile.extendsFrom compileOnly

of the Gradle Groovy DSL to its Kotlin-based equivalent?

configurations {
        testCompile{
            extendsFrom(compileOnly)
        }
    }

My approach above fails.


回答1:


configurations {
        testCompile {
            extendsFrom(configurations.compileOnly.get())
        }
    }

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



来源:https://stackoverflow.com/questions/62452133/gradle-kotlin-dsl-extendsfrom

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!