如何在 Gradle KTS 脚本中获取运行时类路径?

3
在Gradle脚本中,我可以使用sourceSets.main.runtimeClasspath来获取运行时类路径。但在kts脚本中会出现错误提示。
Unresolved reference. None of the following candidates is applicable because of receiver type mismatch: 
public val NamedDomainObjectContainer<Configuration>.runtimeClasspath: NamedDomainObjectProvider<Configuration> defined in org.gradle.kotlin.dsl

我该如何在kts脚本中实现它?
1个回答

5

事实证明,我需要使用sourceSets["main"].runtimeClasspath。不确定是否最符合惯用语。


网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接