import org.xapek.yvesf.gradle.DownloadTask version '0.8.0' task download(type: DownloadTask) { source "https://github.com/patric-r/jvmtop/releases/download/0.8.0/jvmtop-${project.version}.tar.gz" sha256sum 'f9de8159240b400a51b196520b4c4f0ddbcaa8e587fab1f0a59be8a00dc128c4' } task unpack(type: Copy) { from tarTree(download.destFile) into file("${buildDir}/unpacked/dist") eachFile { FileCopyDetails fcd -> fcd.path = fcd.path.substring(path.indexOf('/')+1) } } unpack.dependsOn(download) ospackage { from(fileTree(dir: 'resources')) { into "/opt/${project.name}" } from(unpack.outputs.files) { into "/opt/${project.name}/lib" } }