summaryrefslogtreecommitdiff
path: root/packages/idea-iu/build.gradle
blob: 54126f782c1445df86859f63d6e7ee20b3f61d06 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
import org.xapek.yvesf.gradle.DownloadTask

subprojects {
    task download(type: 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 {
        into "/opt/${project.name}"
        from untar.outputs.files
    }

    activator.bin['idea'] = "/opt/${project.name}/bin/idea.sh"

    project.afterEvaluate {
        download.source "https://download.jetbrains.com/idea/ideaIU-${project.version}.tar.gz"
        untar.from tarTree(download.destFile)
    }
}