in plugins/check-in-generated/src/main/java/co/elastic/gradle/cig/CopyFileMapTask.java [44:63]
public void copyFiles() {
final Map<File, File> map = getMap().get();
if (map.isEmpty()) {
throw new GradleException("The map of files can't be empty");
}
map.forEach((from, to) -> {
if (!from.exists()) {
throw new GradleException("Expected " + from + " to exist but it did not");
}
try {
if (from.isDirectory()) {
FileUtils.copyDirectory(from, to);
} else {
FileUtils.copyFile(from, to);
}
} catch (IOException e) {
throw new UncheckedIOException(e);
}
});
}