Skip to content

Instantly share code, notes, and snippets.

@clmarquart
Created March 5, 2012 02:46
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save clmarquart/1976155 to your computer and use it in GitHub Desktop.
Save clmarquart/1976155 to your computer and use it in GitHub Desktop.
Gradle buildscript project dependency
/**
* Gradle doesn't allow project dependencies within the buildscript
* classpath closure. This is a workaround I came up with to use
* the built Jar of a project in the classpath of another project's
* buildscript.
*
* View it in action: https://github.com/gripes/gripes-test/blob/master/build.gradle
*/
buildscript {
project.getTasks().add([name: "gripes", type: GradleBuild]) {
buildFile = '../gripes-plugin/build.gradle'
tasks = ['pluginJar']
}.execute()
}
@ajuwala
Copy link

ajuwala commented Sep 28, 2017

Hi,
I have the same requirement of using the plugin module inside another module in the same multi-module structure. I've got the example code here . But if I add the code you have suggested, then the build goes in an indefinite loop.
Please have a look at the example code and let me know if I've done something incorrectly.

Thanks
Adee

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment