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

version '2.2.1'

task download(type: DownloadTask) {
    source "http://dist.springframework.org.s3.amazonaws.com/release/GRAILS/grails-${project.version}.zip"
    sha256sum '4ec22ff45718a0f4948261f15f7c46e67ab0c2294d83d6c3eddb110d00f9af1d'
}

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

ospackage {
    into "/opt/${project.name}"
    from unpack.outputs.files {
        user = 'root'
    }
}