-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
60 lines (52 loc) · 1.7 KB
/
build.gradle
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
plugins {
id 'java'
id 'application'
}
mainClassName = 'com.briarbot.client.BriarBot'
sourceCompatibility = 1.8
targetCompatibility = 1.8
sourceSets {
main {
java {
srcDir 'src'
}
}
}
repositories {
mavenCentral()
}
configurations {
// configuration that holds jars to include in the jar
extraLibs
}
dependencies {
// https://mvnrepository.com/artifact/org.glassfish.tyrus.bundles/tyrus-standalone-client
extraLibs group: 'org.glassfish.tyrus.bundles', name: 'tyrus-standalone-client', version: '1.15'
// https://mvnrepository.com/artifact/org.apache.commons/commons-lang3
extraLibs group: 'org.apache.commons', name: 'commons-lang3', version: '3.9'
// https://mvnrepository.com/artifact/org.apache.commons/commons-text
extraLibs group: 'org.apache.commons', name: 'commons-text', version: '1.8'
// https://mvnrepository.com/artifact/javax.websocket/javax.websocket-api
extraLibs group: 'javax.websocket', name: 'javax.websocket-api', version: '1.1'
// https://mvnrepository.com/artifact/com.googlecode.json-simple/json-simple
extraLibs group: 'com.googlecode.json-simple', name: 'json-simple', version: '1.1.1'
testCompile "junit:junit:4.12"
configurations.compile.extendsFrom(configurations.extraLibs)
}
allprojects {
tasks.withType(Jar) { // includes War and Ear
baseName = 'briarbot'
version = '0.1.0'
manifest {
attributes(
'Class-Path': configurations.runtimeClasspath.files.collect { it.getName() }.join(' '),
'Main-Class': 'com.briarbot.client.BriarBot'
)
}
}
}
jar {
from {
configurations.extraLibs.collect { it.isDirectory() ? it : zipTree(it) }
}
}