All Downloads are FREE. Search and download functionalities are using the official Maven repository.

ai.digital.integration.server.common.util.CopyBuildArtifactsUtil.kt Maven / Gradle / Ivy

There is a newer version: 23.3.0-1025.941
Show newest version
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}"))
                }
            }
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy