fogone
11/11/2017, 12:01 PMbuildSrc
. I use kotlin-dsl in this plugin. So in cases when I start some gradle task classes annotated by @HasImplicitReceiver
(f.e. Action
) kotlin interpreted like extension (all properties accessed by this
), but when I trying to build this code from idea it fails with unresolved reference
and expect it
before properties/methods:
fun Project.registerRepository(url: String) {
repositories {
maven {
setUrl(url) // setUrl: unresolved reference, it.setUrl() works great in idea
}
}
}
this code placed in buildSrc/src/main/kotlin/..
idea also highlights this method with red color and show same error
System: IntelliJ IDEA 2017.2.5, Linux, kotlin plugin 1.1.51-release-IJ2017.2-1, gradle 4.3.1