Issue with my Gradle script: Could not find property 'groovy' on source set -



Issue with my Gradle script: Could not find property 'groovy' on source set -

i having problem gradle build script since added custom end2endtest task.

here section of build script corresponding 1 of projects:

project("bignibou-server") { description = "bignibou server" configurations { querydslapt } apply plugin: 'groovy' apply plugin: 'spring-boot' dependencies { compile project(":bignibou-client") //spring bootbignibou-server compile("org.springframework.boot:spring-boot-starter-actuator") compile("org.springframework.boot:spring-boot-starter-data-jpa") ... // testing testcompile("org.springframework.boot:spring-boot-starter-test") testcompile("org.springframework.security:spring-security-test:${springsecurityversion}") testcompile("org.mockito:mockito-core:${mockitoversion}") testcompile("org.hamcrest:hamcrest-core:${hamcrestversion}") testcompile("org.easytesting:fest-assert:${festversion}") ... } springboot { mainclassname = "com.bignibou.application" } sourcesets { generated { java { srcdirs = [ 'build/generated-sources/java' ] } } main { java { srcdir 'build/generated-sources/java' } } integrationtest { java.srcdirs = ['src/it/java'] resources.srcdir file('src/it/resources') compileclasspath = sourcesets.main.output + configurations.testruntime runtimeclasspath = output + compileclasspath } end2endtest { java.srcdirs = [] groovy.srcdirs = ['src/end2end/groovy'] compileclasspath = sourcesets.main.output + configurations.testruntime + sourcesets.integrationtest.output.classesdir runtimeclasspath = output + compileclasspath } } task generatequerydsl(type: javacompile, group: 'build') { description "generates querydsl query types" source = sourcesets.main.java classpath = configurations.compile + configurations.querydslapt options.compilerargs = [ "-proc:only", "-processor", "com.mysema.query.apt.jpa.jpaannotationprocessor" ] destinationdir = sourcesets.generated.java.srcdirs.iterator().next() } task integrationtest(type: test) { description "run integration tests." testclassesdir = sourcesets.integrationtest.output.classesdir classpath = sourcesets.integrationtest.runtimeclasspath reports.html.destination = file("$reports.html.destination/integration") reports.junitxml.destination = file("$reports.junitxml.destination/integration") } task end2endtest(type: test) { description "run end2end tests." testclassesdir = sourcesets.end2endtest.output.classesdir classpath = sourcesets.end2endtest.runtimeclasspath + sourcesets.integrationtest.compileclasspath reports.html.destination = file("$reports.html.destination/end2end") reports.junitxml.destination = file("$reports.junitxml.destination/end2end") } compilejava { dependson generatequerydsl source generatequerydsl.destinationdir } compilegeneratedjava { dependson generatequerydsl options.warnings = false classpath += sourcesets.main.runtimeclasspath } compilegroovy { sourcecompatibility = 1.8 targetcompatibility = 1.8 } end2endtest { dofirst { systemproperties['geb.build.reportsdir'] = 'build/geb-reports' systemproperties['geb.build.baseurl'] = 'http://localhost:8080/' } } check.dependson integrationtest integrationtest.shouldrunafter test end2endtest.shouldrunafter integrationtest clean { delete sourcesets.generated.java.srcdirs } }

when run gradle clean end2endtest

i following:

* went wrong: problem occurred evaluating root project 'bignibou'. > not find property 'groovy' on source set 'end end test'.

i not sure why groovy plugin doesn't find groovy property..

can please help?

edit 1: here finish file: gist here

edit 2: failing line:

groovy.srcdirs = ['src/end2end/groovy']

edit 3: if comment out lastly part of compileclasspath variable (in end2end source set) follows:

compileclasspath = sourcesets.main.output + configurations.testruntime //+ sourcesets.integrationtest.output.classesdir

then gradle build goes farther , compile errors.

what tried accomplish adding sourcesets.integrationtest.output.classesdir compile classpath end2end tests able utilize compiled classes integration test task.

so how can add together resulting .class files integration test task used compile end2end test task?

did tried syntax ?:

groovy { srcdirs = ['src/end2end/groovy'] }

but have here :

sourcesets { generated { java { srcdirs = [ 'build/generated-sources/java' ] } }

in sourcesets have java closure, here have specify if compile sources java or groovy. issue have add together groovy sourceset example:

sourcesets { main { java { srcdirs = [] } // no source dirs java compiler groovy { srcdirs = ['src/end2end/groovy'] } // compile in src/ groovy //noinspection groovyassignabilitycheck resources { srcdirs = ['src/resources']} }

groovy gradle build.gradle

Comments

Popular posts from this blog

formatting - SAS SQL Datepart function returning odd values -

c++ - Apple Mach-O Linker Error(Duplicate Symbols For Architecture armv7) -

php - Yii 2: Unable to find a class into the extension 'yii2-admin' -