我正在使用以下代码:
java.sourceSets["main"].java {
srcDir("src/main/extraSource")
}
在 gradle 4.9 中完美运行,但在 4.10 rc1 中出现以下错误:
Line 5: java.sourceSets["main"].java {
^ Unresolved reference. None of the following candidates is applicable because of receiver type mismatch:
public val Project.sourceSets: SourceSetContainer defined in org.gradle.kotlin.dsl
有任何想法吗?需要的东西有变化吗?如果情况发生变化,许多其他答案(例如,这个 问题的每个建议答案)也需要更新