I have a multi project build environment setup, in my root gradle build script I’ve created a ‘provided’ configuation because Gradle still does not supply a compile-only dependency configuration.
When I attempt to generate an Eclipse project and .classpath file using the Gradle Eclipse plugin the provided dependencies are not added to the .classpath.
The build scripts look as follows:
// root build.gradle
subprojects {
apply plugin: 'eclipse'
configurations {
provided
}
plugins.withType(JavaPlugin) {
repositories {
mavenCentral()
}
sourceSets {
main { compileClasspath += configurations.provided }
}
dependencies {
provided group: 'org.projectlombok', name: 'lombok', version: '0.11.2'
}
eclipse {
classpath { plusConfigurations += configurations.provided }
}
}
}
// settings.gradle
include 'App'
include 'Api'
include 'Service'
// each child project
apply plugin: 'java'
I’m using Gradle 1.1 to test with at the moment.