summaryrefslogtreecommitdiff
path: root/packages/grails/build.gradle
blob: 6a101be0da81b62efe4e080fba5ac63f6ffa4f20 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
import org.xapek.yvesf.gradle.DownloadTask

subprojects {
    task download(type: DownloadTask) {}

    task unzip(type: Copy) {
        into file("${buildDir}/unpacked/dist")
        eachFile { FileCopyDetails fcd ->
            fcd.path = fcd.path.substring(path.indexOf('/')+1)
        }
    }
    unzip.dependsOn(download)

    ospackage {
        into "/opt/${project.name}"
        from unzip.outputs.files
    }

    project.afterEvaluate {
        unzip.from zipTree(download.destFile)
    }
}