Could not determine the dependencies of task ':app-global:enhance'

Hi there, I need a help, when I try to run tests the tests from the serviceBean fail and run the follow error:

> No such property: outputDir for class: org.gradle.api.internal.file.DefaultSourceDirectorySet

This is my build.gradle:


//import com.haulmont.cuba.core.sys.persistence.CubaPostgreSQLPlatform

buildscript {
    ext.cubaVersion = '6.9.2'
    repositories {
        maven {
            url 'https://repo.cuba-platform.com/content/groups/work'
            credentials {
                username(rootProject.hasProperty('repoUser') ? rootProject['repoUser'] : 'cuba')
                password(rootProject.hasProperty('repoPass') ? rootProject['repoPass'] : 'cuba123')
            }
        }
        maven {
            url 'https://repo.cuba-platform.com/content/groups/premium'
            credentials {
                username(rootProject.hasProperty('premiumRepoUser') ? rootProject['premiumRepoUser'] : System.getenv('CUBA_PREMIUM_USER'))
                password(rootProject.hasProperty('premiumRepoPass') ? rootProject['premiumRepoPass'] : System.getenv('CUBA_PREMIUM_PASSWORD'))
            }
        }
        maven {
            url "https://plugins.gradle.org/m2/"
        }
    }
    dependencies {
        classpath "com.haulmont.gradle:cuba-plugin:$cubaVersion"
        classpath "com.moowork.gradle:gradle-node-plugin:1.2.0"
    }
}

apply plugin: "com.moowork.node"

def globalModule = project(':app-global')
def coreModule = project(':app-core')
def guiModule = project(':app-gui')
def webModule = project(':app-web')
def polymerClientModule = project(':app-polymer-client')

def servletApi = 'org.apache.tomcat:tomcat-servlet-api:8.0.26'
apply(plugin: 'eclipse')
apply(plugin: 'java')
apply(plugin: 'idea')
apply(plugin: 'cuba')

cuba {
    artifact {
        group = 'ca.theaidplans.muaipm'
        version = '0.1'
        isSnapshot = true
    }
    tomcat {
        dir = "$project.rootDir/deploy/tomcat"
    }
    ide {
        vcs = 'Git'
    }
}

dependencies {
    appComponent("com.haulmont.cuba:cuba-global:$cubaVersion")
    appComponent("com.haulmont.reports:reports-global:$cubaVersion")

}

def postgres = 'org.postgresql:postgresql:9.4.1212'

configure([globalModule, coreModule, guiModule, webModule]) {
    apply(plugin: 'java')
    apply(plugin: 'maven')
    apply(plugin: 'eclipse')
    apply(plugin: 'idea')
    apply(plugin: 'cuba')

    dependencies {
        testCompile('junit:junit:4.12')
        compile("com.haulmont.cuba:cuba-core:$cubaVersion")
        testCompile("com.haulmont.cuba:cuba-core-tests:$cubaVersion")
        testCompile("com.haulmont.cuba:cuba-shared-lib:$cubaVersion")

    }

    task sourceJar(type: Jar) {
        from file('src')
        classifier = 'sources'
    }

    artifacts {
        archives sourceJar
    }
}

configure(globalModule) {
    task enhance(type: CubaEnhancing)


}

configure(coreModule) {

    configurations {
        jdbc
        dbscripts
    }

    dependencies {
        compile(globalModule)
        provided(servletApi)
        jdbc(postgres)
        testRuntime(postgres)
        compile("com.haulmont.cuba:cuba-core:$cubaVersion")
        testCompile("com.haulmont.cuba:cuba-core-tests:$cubaVersion")
        testCompile("com.haulmont.cuba:cuba-shared-lib:$cubaVersion")



    }


    task cleanConf(description: 'Cleans up conf directory') {
        doLast {
            def dir = new File(cuba.tomcat.dir, '/conf/app-core')
            if (dir.isDirectory()) {
                ant.delete(includeemptydirs: true) {
                    fileset(dir: dir, includes: '**/*', excludes: 'local.app.properties')
                }
            }
        }
    }

    task deploy(dependsOn: [assemble, cleanConf], type: CubaDeployment) {
        appName = 'app-core'
        appJars('app-global', 'app-core')
    }

    task createDb(dependsOn: assembleDbScripts, description: 'Creates local database', type: CubaDbCreation) {
        dbms = 'postgres'
        host = 'localhost'
        dbName = 'muaipm'
        dbUser = 'postgres'
        dbPassword = '83dEsg@27'
    }

    task updateDb(dependsOn: assembleDbScripts, description: 'Updates local database', type: CubaDbUpdate) {
        dbms = 'postgres'
        host = 'localhost'
        dbName = 'muaipm'
        dbUser = 'postgres'
        dbPassword = '83dEsg@27'
    }



    task createTestDb(dependsOn: assembleDbScripts, description: 'Creates local database', type: CubaDbCreation) {
        dbms = 'postgres'
        host = 'localhost'
        dbName = 'muaipm_test'
        dbUser = 'postgres'
        dbPassword = '83dEsg@27'
    }

  /*  task startTestDb(type: Exec){
        dbName = 'muaipm_test'
    }*/


}

configure(guiModule) {
    dependencies {
        compile(globalModule)

    }

    task deployConf(type: Copy) {
        from file('src')
        include "ca/theaidplans/muaipm/**"
        into "$cuba.tomcat.dir/conf/app"
    }
}

configure(webModule) {
    configurations {
        webcontent
    }

    dependencies {
        provided(servletApi)
        compile(guiModule)

    }

    task webArchive(type: Zip) {
        from file("$buildDir/web")
        from file('web')
        classifier = 'web'
    }

    artifacts {
        archives webArchive
    }

    task deployConf(type: Copy) {
        from file('src')
        include "ca/theaidplans/muaipm/**"
        into "$cuba.tomcat.dir/conf/app"
    }

    task clearMessagesCache(type: CubaClearMessagesCache) {
        appName = 'app'
    }
    deployConf.dependsOn clearMessagesCache

    task cleanConf(description: 'Cleans up conf directory') {
        doLast {
            def dir = new File(cuba.tomcat.dir, '/conf/app')
            if (dir.isDirectory()) {
                ant.delete(includeemptydirs: true) {
                    fileset(dir: dir, includes: '**/*', excludes: 'local.app.properties')
                }
            }
        }
    }

    task deploy(dependsOn: [assemble, cleanConf], type: CubaDeployment) {
        appName = 'app'
        appJars('app-global', 'app-gui', 'app-web')
    }
}

configure(polymerClientModule) {
    apply(plugin: 'eclipse')
apply(plugin: 'idea')
apply(plugin: 'cuba')

    task assemble()

    task deploy(type: Copy) {
        from file('build/bundled')
        into "$cuba.tomcat.dir/webapps/app-front"
    }
}

task undeploy(type: Delete, dependsOn: ':app-web:cleanConf') {
    delete("$cuba.tomcat.dir/shared")
    delete("$cuba.tomcat.dir/webapps/app-core")
    delete("$cuba.tomcat.dir/webapps/app")
    delete("$cuba.tomcat.dir/webapps/app-front")
}

task restart(dependsOn: ['stop', ':app-core:deploy', ':app-web:deploy'], description: 'Redeploys applications and restarts local Tomcat') {
    doLast {
        ant.waitfor(maxwait: 6, maxwaitunit: 'second', checkevery: 2, checkeveryunit: 'second') {
            not {
                socket(server: 'localhost', port: '8787')
            }
        }
        start.execute()
    }
}

task wrapper(type: Wrapper) {
    gradleVersion = '3.4'
}

apply from: 'extra.gradle'

task jelasticBuildWar(type: CubaWarBuilding) {
    appHome = '..'
    webXmlPath = 'modules/web/web/WEB-INF/single-war-web.xml'
    appProperties = ['cuba.automaticDatabaseUpdate' : true]
    includeJdbcDriver = true
    includeContextXml = true
    coreContextXmlPath = 'modules/core/web/META-INF/jelastic-context.xml'
    // Specify the folder where the front end is placed
    polymerBuildDir = 'bundled'
}

task jelasticDeployWar(type: CubaJelasticDeploy, dependsOn: jelasticBuildWar) {
    context = 'app'
    email = rootProject.hasProperty('jelasticEmail') ? rootProject['jelasticEmail'] : ''
    password = rootProject.hasProperty('jelasticPassword') ? rootProject['jelasticPassword'] : ''
    hostUrl = 'app.jelastic.eapps.com'
    environment = 'env-3827508'
}

Hi,

What version of Gradle do you use?

Gradle 3.4
------------------------------------------------------------

Build time:   2017-02-20 14:49:26 UTC
Revision:     73f32d68824582945f5ac1810600e8d87794c3d4

Groovy:       2.4.7
Ant:          Apache Ant(TM) version 1.9.6 compiled on June 29 2015
JVM:          1.8.0_181 (Oracle Corporation 25.181-b13)
OS:           Mac OS X 10.13.6 x86_64

With platform 6.9 you should use Gradle 4.0+. We have tested it with Gradle 4.3.

Also, I’d recommend that you create a Gradle wrapper and use it instead of manually installed Gradle distribution.

Hi, I updatet to Gradle 4.9 and when I run ./gradlew test to run my unit test, display the message:

> Task :app-core:test FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app-core:test'.
> There were failing tests. See the report at: file:///Users/felipeonofrio/IdeaProjects/muaipm/modules/core/build/reports/tests/test/index.html

It is correct, please check your tests.

See the referenced HTML report.