I have this in my build.gradle file for functionalTest task
task functionalTest(type: Test) {
println “***** functionalTest "
testClassesDir = sourceSets.functionalTest.output.classesDir
classpath = sourceSets.functionalTest.runtimeClasspath + files(”${rootProject.projectDir}")
…
I"m getting this error in the stacktrace:
Caused by: java.io.IOException: The process cannot access the file because another process has locked a portion of the file
If I change classpath to this it works fine:
classpath = sourceSets.functionalTest.runtimeClasspath
I’m trying to figure out why adding the + files("${rootProject.projectDir}") causes the file locking problem and how to avoid it.
Gradle 4.10.2
Build time: 2018-09-19 18:10:15 UTC
Revision: b4d8d5d170bb4ba516e88d7fe5647e2323d791dd
Kotlin DSL: 1.0-rc-6
Kotlin: 1.2.61
Groovy: 2.4.15
Ant: Apache Ant™ version 1.9.11 compiled on March 23 2018
JVM: 1.8.0_161 (Oracle Corporation 25.161-b12)
OS: Windows 10 10.0 amd64