Weird warning: Using a single directory for all classes from a source set

I have just switched to the newest Gradle version 4.0-rc1 and I am receiving a weird warning that does not make sense:

Using a single directory for all classes from a source set. This behaviour has been deprecated and is scheduled to be removed in Gradle 5.0

When I look at the build script, I am not following what is wrong:

apply plugin: 'java'
apply plugin: 'ca.cutterslade.analyze' // Warning is pointing at this line

dependencies {
    compile project(':common')
    compile project(':server:server-terminal-api')
    compile project(':server:server-quiz-api')
    compile 'com.caucho:hessian'
    compile 'org.jboss.logging:jboss-logging'
    compile 'org.apache.logging.log4j:log4j-api'
    compile 'log4j:log4j'
    compile 'org.jgroups:jgroups'
    compile 'cglib:cglib-nodep'
    compile 'org.apache.commons:commons-lang3'

    testCompile 'junit:junit'
}

//TODO#2 - make it global
configurations.all {
    resolutionStrategy {
        failOnVersionConflict()
    }
    // check for updates every build
    resolutionStrategy.cacheChangingModulesFor 0, 'seconds'
}

Can anyone give me a clue? Does it mean the plugin on the 2nd line is causing the warning?

Hi Martin,

Yes, you are right. It seems like the plugin ca.cutterslade.analyze is causing the issue.
Calls to getClassesDir() as here will cause the warning.
Could you open an issue for this plugin in the plugin repository on github: https://github.com/wfhartford/gradle-dependency-analyze/issues?
The reason for this warning is that we did split the classes directory per compile task in Gradle 4.0. See the release notes for further details.

Cheers,
Stefan

I’ve just released version 1.1.1 of this plugin which resolves this warning.

Is there a better way to support previous gradle versions than something like the hasProperty method I’ve used?

Thanks,

Wesley