ai.digital.integration.server.common.util.CopyBuildArtifactsUtil.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of integration-server-gradle-plugin Show documentation
Show all versions of integration-server-gradle-plugin Show documentation
The easy way to get custom setup for Deploy up and running
package ai.digital.integration.server.common.util
import org.apache.commons.io.FileUtils
import org.gradle.api.Project
import java.io.File
class CopyBuildArtifactsUtil {
companion object {
fun execute(project: Project, copyBuildArtifacts: Map, workingDir: String) {
copyBuildArtifacts.forEach { entry: Map.Entry ->
val where = entry.key
val whatPattern = entry.value
FileUtil.findFiles(
project.buildDir.absolutePath,
whatPattern, "/[^/]*integration-server/[^/]*"
).forEach { file: File ->
FileUtils.copyFile(file, File("${workingDir}/${where}/${file.name}"))
}
}
}
}
}