I am following this approach:
http://forums.gradle.org/gradle/topics/how_do_i_best_define_dependencies_as_provided
to create a provided scope for some of my plain java projects. Now I would like to move this configuration to a custom plugin I am writing. Creating the new configuration is simple but how do I specify the following:
sourceSets {
main {
compileClasspath += configurations.provided
on the project object in the plugin? I have tried:
project.getConfigurations().create("provided");
project.compileClasspath += project.configurations.provided
but get:
Could not find property 'compileClasspath' on root project ...
From the docs this should be supplied when applying the java plugin:
http://www.gradle.org/docs/current/userguide/java_plugin.html