summaryrefslogtreecommitdiff
path: root/javaSE/hello_sdl_java/build.gradle
blob: ce0689640e64ca0ea738ed4a5bed9b03777509f5 (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
plugins {
    id 'java'
}

version '1.0'

sourceCompatibility = 1.7

repositories {
    mavenCentral()
    mavenLocal()
    google()
    jcenter()
}
// This extraLibs solution is explained here: https://discuss.gradle.org/t/how-to-include-dependencies-in-jar/19571/5
configurations {
    // configuration that holds jars to include in the jar
    extraLibs
}
dependencies {
    extraLibs fileTree(dir: 'libs', include: ['*.jar'])
    extraLibs project(path: ':sdl_java_se')
    configurations.implementation.extendsFrom(configurations.extraLibs)
}
jar {
    from {
        configurations.extraLibs.collect { it.isDirectory() ? it : zipTree(it) }
    }
    manifest {
        attributes 'Class-Path': configurations.compile.collect { it.getName() }.join(' ')
        attributes 'Main-Class': 'com.smartdevicelink.java.Main'
    }
}