-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
78 lines (58 loc) · 2.02 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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
apply plugin: "java"
apply plugin: "idea"
apply plugin: 'application'
apply plugin: 'java'
apply plugin: 'eclipse'
apply plugin: 'idea'
//dependencies{
// testCompile group: 'com.sun.net.httpserver', name: 'http', version: '20070405'
//}
sourceSets {
main.java.srcDir("src")
test.java.srcDir("test")
}
mainClassName = "com.panic.tdt4240.ServerInit"
run {
//args = ["8887"]
if(project.hasProperty('myargs')){
args(myargs.split(','))
}
main = "com.panic.tdt4240.ServerInit"
classpath = sourceSets.main.runtimeClasspath
}
jar {
baseName = 'panicserver'
version = '0.1.0'
manifest.attributes 'Main-Class': "com.panic.tdt4240.ServerInit"
from {
configurations.compile.collect { it.isDirectory() ? it : zipTree(it) }
}
}
task customFatJar(type: Jar) {
manifest {
attributes 'Main-Class': 'com.panic.tdt4240.ServerInit'
}
baseName = 'all-in-one-jar'
from { configurations.compile.collect { it.isDirectory() ? it : zipTree(it) } }
with jar
}
repositories {
mavenCentral()
}
sourceCompatibility = 1.8
targetCompatibility = 1.8
dependencies {
compile 'org.java-websocket:Java-WebSocket:1.3.8'
testCompile 'junit:junit:4.12'
testCompile 'org.mockito:mockito-core:1.+'
//compile group: 'javax', name: 'javaee-api', version: '8.0'
//testCompile group: 'org.eclipse.jetty', name: 'jetty-runner', version: '9.4.2.v20170220'
/* compile group: 'com.typesafe.akka', name: 'akka-stream_2.12', version:'2.5.11'
testCompile group: 'com.typesafe.akka', name: 'akka-stream-testkit_2.12', version:'2.5.11'
compile group: 'com.typesafe.akka', name: 'akka-http_2.12', version:'10.1.0'
testCompile group: 'com.typesafe.akka', name: 'akka-http-testkit_2.12', version:'10.1.0'
compile group: 'com.typesafe.akka', name: 'akka-actor_2.12', version: '2.5.11'
testCompile group: 'com.typesafe.akka', name: 'akka-tmestkit_2.12', version: '2.5.11'*/
testCompile 'org.junit.jupiter:junit-jupiter-api:5.1.1'
}
task stage(dependsOn: jar)