summaryrefslogtreecommitdiffstats
path: root/build.gradle
blob: ad9610a4aa0f278a6c9dd752c31cfab6b58c33cb (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
26
27
28
29
30
31
32
33
34
35
36
37
38
plugins {
    id 'java'
}

sourceCompatibility = '1.8'
targetCompatibility = '1.8'

repositories {
    mavenCentral()
}

dependencies {
    compile 'com.gistlabs:mechanize:0.13.1'
    compile fileTree('lib') { include '*.jar' }
}

jar {
    manifest {
        attributes 'Main-Class': 'de.spline.kvm.Launcher'
    }
}

task fatJar(type: Jar) {
    dependsOn jar

    manifest.from jar.manifest
    destinationDir = file("$rootDir/build/")

    duplicatesStrategy = DuplicatesStrategy.EXCLUDE
    from { sourceSets.main.output }
    from { configurations.runtimeClasspath.collect { it.isDirectory() ? it : zipTree(it) } }

    with jar
}

artifacts {
    archives fatJar
}