Compiling a gradle plugin with linked in Java projects


(Jake Ouellette) #1

So, I have two projects in my workspace that are both sub-projects of the same settings.gradle. One of them is a java project and the other is a gradle plugin (so groovy / java project). When I try to link in the java project via the groovy project, I receive a very unfriendly " unable to resolve class" error. As it turns out, this bug from ~2012 may be related:

http://issues.gradle.org/browse/GRADLE-2574

When I execute with --rerun-tasks, the problem goes away.

I would not want to turn my utility project into a groovy project because I use it in other contexts as a java project. I would not want to do --rerun-tasks each time I build this plugin, because that increases the time complexity of my build. Is there a solution for this?


(Peter Niederwieser) #2

What do you mean by “link in the java project via the groovy project”? Where exactly do you get the error (which task etc.)?