I am trying to set up a gradle build script for a multiproject grails application. I have used the grails-gradle plugin and got it up and running to create a new application.
However, I have some problems when I want to convert an existing grails multiproject application to use gradle.
I have declared all subprojects in my settings.gradle file as follows:
include 'core',
//Plugins
'plugin1',
'plugin2'
and for each subproject set up its dependencies in their own build.gradle files. e.g. plugin1 is dependent on plugin2 so I have declared the following in plugin1's build.gradle file:
dependencies {
compile project(':plugin2')
}
However, I got the following error when I try to run the gradle test command:
UNRESOLVED DEPENDENCIES
What went wrong:
Execution failed for task ':plugin1:test'.
Cause: Could not resolve all dependencies for configuration ':plugin1:runtime':
- unresolved dependency: {}#plugin2;1.5-SNAPSHOT: configuration not found in {}#plugin2;1.5-SNAPSHOT: 'default'. It was required from {}#plugin1;1.5-SNAPSHOT compile
My question is then, How do I set up the subproject dependencies in gradle?
I have declared them in each subprojects BuildConfig.groovy as inline dependencies, do I have to declare them in gradle as well?
subprojectsclosure in the main build file. Stacktrace can be viewed here: Stacktrace - Mathias Åhsberg