-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
33 lines (28 loc) · 912 Bytes
/
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
apply plugin: 'java'
apply plugin: 'application'
mainClassName = "io.hxiao.udpserver.UDPServer"
repositories {
mavenLocal()
try {
Inet4Address.getByName("mirrors.tencentyun.com")
maven { url "http://mirrors.tencentyun.com/nexus/repository/maven-public/" }
println "use tencentyun mirror"
} catch (Exception e) {
e.toString()
println "mirrors.tencentyun.com cannot connect, use maven central"
mavenCentral()
}
}
dependencies {
// https://mvnrepository.com/artifact/io.netty/netty-all
compile group: 'io.netty', name: 'netty-all', version: '4.1.29.Final'
testCompile "junit:junit:4.12"
}
task fatJar(type: Jar) {
baseName = project.name + '-all'
from { configurations.compile.collect { it.isDirectory() ? it : zipTree(it) } }
with jar
manifest {
attributes 'Main-Class': 'io.hxiao.udpserver.UDPServer'
}
}