1
0
Fork 0
mirror of https://github.com/ethauvin/kobalt.git synced 2025-04-26 08:27:12 -07:00

Introducing the copy() directive for installation.

Example use:

    install {
        collect(compileDependencies).map {
            copy(it, to("deploy"))
        }
    }
This commit is contained in:
Cedric Beust 2017-04-05 14:11:30 -07:00
parent 756fbec648
commit 9514d80b99
3 changed files with 17 additions and 2 deletions

View file

@ -223,9 +223,10 @@ class PackagingPlugin @Inject constructor(val dependencyManager : DependencyMana
config.includedFiles.forEach { inf ->
val target = inf.to
val targetFile = File(target)
val files = KFiles.materializeIncludedFiles(project, listOf(inf))
context.logger.log(project.name, 2, " Deleting target dir $targetFile")
targetFile.deleteRecursively()
targetFile.mkdirs()
val files = KFiles.materializeIncludedFiles(project, listOf(inf))
files.forEach {
context.logger.log(project.name, 1, " Installing $it to $targetFile")
KFiles.copyRecursively(it, targetFile, true)