Gradle-2.14-rc-1 could not find method main() for sourceSets

I get an error now when I try to add folders to the java source set:

apply plugin: 'java'
apply plugin: 'maven'

configurations {
        main {  // > Could not find method main() ...
            java {
                srcDir 'src-generated/java'

It seems this should never have been inside the configurations block, but it was working in 2.13.

Thank you for reporting. This is fixed in 2.14-rc-3 but the behavior could be deprecated in 3.0.