diff options
Diffstat (limited to 'packages/oraclejdk/oracle.gradle')
-rw-r--r-- | packages/oraclejdk/oracle.gradle | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/packages/oraclejdk/oracle.gradle b/packages/oraclejdk/oracle.gradle new file mode 100644 index 0000000..498b3d7 --- /dev/null +++ b/packages/oraclejdk/oracle.gradle @@ -0,0 +1,34 @@ +buildscript { + repositories { + mavenLocal() + mavenCentral() + } + dependencies { + classpath 'org.xapek.yvesf:gradle-download-task:0.1-SNAPSHOT' + } +} + +task download(type: org.xapek.yvesf.gradle.DownloadTask) {} + +task untar(type: Copy) { + into file("${buildDir}/unpacked/dist") + eachFile { FileCopyDetails fcd -> + fcd.path = fcd.path.substring(path.indexOf('/') + 1) + } +} +untar.dependsOn(download) + +ospackage { + from untar.outputs.files +} + +project.afterEvaluate { + untar.from tarTree(download.destFile) +} + +tasks.getByName('activator').dependsOn('untar') +tasks.getByName('activator').doFirst { + file("${buildDir}/unpacked/dist/bin").list().each { + activator.bin[it] = "/opt/${project.name}/bin/${it}" + } +} |