summaryrefslogtreecommitdiff
path: root/packages/groovy-bin/groovy.gradle
blob: 6a42d6df62a7ee8bfe2616f4891fd6d3b03e865d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
final download = makeDownloadTask(
    url: "http://dl.bintray.com/groovy/maven/apache-groovy-binary-${project.version}.zip",
    sha256: sha256sum)

task unzip(type: Copy) {
  from zipTree(download.dest)
  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
}

activator.bin['groovysh'] = "/opt/${project.name}/bin/groovysh"
activator.bin['groovy'] = "/opt/${project.name}/bin/groovy"
activator.bin['groovyConsole'] = "/opt/${project.name}/bin/groovyConsole"
activator.env['GROOVY_HOME'] = "/opt/${project.name}"