summaryrefslogtreecommitdiff
path: root/packages/groovy-bin/build.gradle
diff options
context:
space:
mode:
Diffstat (limited to 'packages/groovy-bin/build.gradle')
-rw-r--r--packages/groovy-bin/build.gradle23
1 files changed, 23 insertions, 0 deletions
diff --git a/packages/groovy-bin/build.gradle b/packages/groovy-bin/build.gradle
new file mode 100644
index 0000000..497bafa
--- /dev/null
+++ b/packages/groovy-bin/build.gradle
@@ -0,0 +1,23 @@
+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 {
+ download.source "http://dl.bintray.com/groovy/maven/apache-groovy-binary-${project.version}.zip"
+ unzip.from zipTree(download.destFile)
+ }
+}