I’m trying to upgrade an old gradle build to use a more modern version of Gradle and have hit a problem with a change in the copy() method syntax that seemed to occur in 4.3.1.
I had a task that was necessary to copy the CDI beans.xml file into the compiled sources (and similar in test sources).
classes.doLast {
copy {
from('src/main/resources') { include 'META-INF/beans.xml' }
into "$buildDir/classes/main/"
}
}
This now doesn’t work:
Task :cell-executor:classes FAILED
A problem was found with the configuration of task ‘:cell-executor:classes’. Registering invalid inputs and outputs via TaskInputs and TaskOutputs methods has been deprecated and is scheduled to be removed in Gradle 5.0.
- Directory ‘/home/timbo/github/im/squonk/squonk/components/cell-executor/src/main/resources/META-INF/beans.xml’ specified for property ‘$1’ is not a directory.
So 2 questions really:
- what has changed in the copy method syntax?
- is this still the best way to handle this?