I am copying files using a copy block in Gradle 6.2 as follows but it does not fail if the file is missing.
copy {
from file("$project.projectDir/ABC.toml")
into file("${artifactDir}/XYZ")
}
How can I make the copying fail if "$project.projectDir/ABC.toml" file is missing ?