From 74ad736656b986942d99667394b5462975c26304 Mon Sep 17 00:00:00 2001 From: Yves Fischer Date: Sun, 23 Oct 2016 19:45:34 +0200 Subject: refactor buildscripts to use de.undercouch.download for dowload and verify --- packages/groovy-bin/groovy.gradle | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 packages/groovy-bin/groovy.gradle (limited to 'packages/groovy-bin/groovy.gradle') diff --git a/packages/groovy-bin/groovy.gradle b/packages/groovy-bin/groovy.gradle new file mode 100644 index 0000000..6a42d6d --- /dev/null +++ b/packages/groovy-bin/groovy.gradle @@ -0,0 +1,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}" \ No newline at end of file -- cgit v1.2.1