Problems with the daemon when updating a Gradle plugin

Hey guys,

I’m developing a plugin for Gradle to be used with Android Studio, and I have some problems with the Gradle daemon when updating my plugin. As Android Studio always keeps the daemon up, I’m seeing this problem a lot during development. I’m currently using Gradle version 2.4.
My plugin is saved into a local repository on my disk - maven { url uri(‘file:///D:/repo’) }
and during development I update it often, overriding the same version in the repository.
Then, when running the build on a target application, Gradle uses the latest plugin version from the local repository (which is OK), but after an update my plugin would often fail when trying to access its internal resources. Specifically it would fail at this line:

InputStream is = this.getClass().getResourceAsStream("/resources/ViewClasses.txt");

The above command in this case returns null, even thought the resource file “ViewClasses.txt” is there in the right place inside the plugin jar file.
Killing the daemon process and running the build again solves the problem, which is the reason I suspect it is a problem with the daemon.

Thanks,
Ariel