2

Facing the below build error while upgrading project to springboot 2.7.7 / spring 5.4/junit 5/gradle 7.2 and pitest vesion from 1.4.0 to 1.9.0.

Cannot set the value of a property of type org.gradle.api.file.Directory using an instance of type org.codehaus.groovy.runtime.GStringImpl.

the below is entry in build.gradle.

pitest {
    targetClasses = ['com.eew.wrew.werew.*']
    enableDefaultIncrementalAnalysis = true
    reportDir = "${buildDir}/reports/pit/${project.version}"
    outputFormats = ['HTML']
    pitestVersion = '1.9.0'
    timeoutConstInMillis = 100000
    mutationThreshold = 80
    timestampedReports=false
}
KVL
  • 95
  • 1
  • 14

1 Answers1

1

Need to convert the string value to a directoy type before assigning it.

reportDir = file("${buildDir}/reports/pit/${project.version}" )
KVL
  • 95
  • 1
  • 14