But when I run gradle generated_java:regenerate it complains:
FAILURE: Build failed with an exception.
* What went wrong:
A problem occurred configuring project ':generated_java'.
> Cannot use project dependencies in a script classpath definition.
You might need to split utils and gradle_tasks into their own separate multi-module build under the buildSrc directory (using buildSrc/build.gradle and buildSrc/settings.gradle). Then, from the main gradle build you could refer to the buildSrc artifacts using group:artifact:version notation rather than project(...).
In my project I already moved frombuildSrc/ to flat multi-module structure, where there is one module which is a Gradle plugin, used in other modules. Purpose for that was to release that Gradle plugin also by itself.
This problem becomes pressing, because recently I’ve encountered Java compiler bug, which is fixed in Java 9. But I cannot use JDK 9 with Gradle 2.5 (apparently the last Gradle version which doesn’t have this limitation, because it doesn’t recognise JDK 9:
@leventov have you found a solution for your issue?
I am currently in the same situation: I’d like to have a multi project in which there is a gradle-plugin defined (the main artifact of the whole project). In addition there is a framework taking leverage of the plugin (only for testing though), as they go hand in hand.
I suppose I could put the gradle-plugin under root/buildSrc and define some artifact release configuration int the corresponding build.gradle?