Unresolved Reference - Unable to unit test the gradle plugin


Hi folks!

So I’m working on a few of the gradle plugin bugs and unfortunately I’ve noticed that the build does not allow for gradle api unit testing.  I’ve started working on a gradle build that will allow for this but the (hopefully) last issue preventing a compile is an unresolved reference to FilenameUtils.containsDirectory:

Tasks.kt:61:Unresolved reference: directoryContains

This comes from commons-io.  Apparently this method has existed since version 2.2 of the plugin and we are currently using 2.4.  Note, both intellij (which gets it’s dependencies from the maven build) and gradle show this as an error.  Particularly strange is that intellij is pointing to the Java source file that does in fact contain that method.  It will auto-complete on some of the methods and not others.  Most of the methods are static but it doesn’t see some of them but does see others.

To make it stranger still, the maven build has no problems with it and builds fine.

Thanks in advance,



Hello Steve,

I am not sure I correctly understand what you are trying to achieve. Are you trying to move kotlin-gradle-plugin build to Gradle?
If you have your patch available on Github,  I could try to download it and investigate.

There obviously is some difference in classpath between IntelliJIdea, Maven and Gradle. E.g., gradleAPI() dependency may differ from re-packed gradle api version that exis in Maven repository.


I've already started to investigate this problem. Thank you!


Hi there! I’ve faced this problem on kotlin-lang 1.1.1 Is there any news on resolving this issue?


What problem have you faced exactly? Are you trying to contribute to Kotlin?


I’m writing my own gradle plugin in kotlin. And can’t execute test written in kotlin too.