2019-04-24 14:36:49 -04:00
|
|
|
import com.github.jengelman.gradle.plugins.shadow.transformers.Log4j2PluginsCacheFileTransformer
|
|
|
|
|
2018-07-31 16:12:41 -04:00
|
|
|
plugins {
|
|
|
|
id 'java'
|
2018-10-27 23:45:35 -04:00
|
|
|
id 'checkstyle'
|
2019-04-24 14:36:49 -04:00
|
|
|
id "net.ltgt.errorprone" version "0.8"
|
2018-07-31 16:12:41 -04:00
|
|
|
}
|
|
|
|
|
2018-10-27 23:45:35 -04:00
|
|
|
apply from: '../gradle/checkstyle.gradle'
|
2019-04-24 14:36:49 -04:00
|
|
|
apply from: '../gradle/errorprone.gradle'
|
2019-03-28 21:46:45 -04:00
|
|
|
apply plugin: 'com.github.johnrengelman.shadow'
|
2018-07-31 16:12:41 -04:00
|
|
|
|
|
|
|
jar {
|
|
|
|
manifest {
|
2018-09-03 21:02:11 -04:00
|
|
|
def buildNumber = System.getenv("BUILD_NUMBER") ?: "unknown"
|
2019-06-12 18:10:33 -04:00
|
|
|
def version
|
|
|
|
if (project.version.endsWith("-SNAPSHOT")) {
|
|
|
|
version = "${project.version} (git-${project.ext.getCurrentShortRevision()}-b${buildNumber})"
|
|
|
|
} else {
|
|
|
|
version = "${project.version}"
|
|
|
|
}
|
2018-09-03 21:02:11 -04:00
|
|
|
|
2018-07-31 16:12:41 -04:00
|
|
|
attributes 'Main-Class': 'com.velocitypowered.proxy.Velocity'
|
2018-10-25 01:56:41 -04:00
|
|
|
attributes 'Implementation-Title': "Velocity"
|
2018-09-03 21:02:11 -04:00
|
|
|
attributes 'Implementation-Version': version
|
2018-10-25 01:56:41 -04:00
|
|
|
attributes 'Implementation-Vendor': "Velocity Contributors"
|
2019-04-25 19:12:22 -04:00
|
|
|
attributes 'Multi-Release': 'true'
|
2018-07-31 16:12:41 -04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2019-03-28 22:01:33 -04:00
|
|
|
shadowJar {
|
2019-04-24 14:36:49 -04:00
|
|
|
transform(Log4j2PluginsCacheFileTransformer)
|
2019-03-28 22:01:33 -04:00
|
|
|
}
|
|
|
|
|
2018-12-29 17:22:36 -05:00
|
|
|
tasks.withType(Checkstyle) {
|
|
|
|
exclude('**/com/velocitypowered/proxy/protocol/packet/*.java')
|
|
|
|
}
|
|
|
|
|
2018-07-31 16:12:41 -04:00
|
|
|
dependencies {
|
2018-09-29 23:28:44 -04:00
|
|
|
// Note: we depend on the API twice, first the main sourceset, and then the annotation processor.
|
2018-07-31 16:12:41 -04:00
|
|
|
compile project(':velocity-api')
|
2018-09-29 23:28:44 -04:00
|
|
|
compile project(':velocity-api').sourceSets.ap.output
|
2018-08-01 00:20:39 -04:00
|
|
|
compile project(':velocity-native')
|
2018-08-07 16:24:01 +02:00
|
|
|
|
2018-07-31 16:12:41 -04:00
|
|
|
compile "io.netty:netty-codec:${nettyVersion}"
|
2018-10-05 07:33:27 +13:00
|
|
|
compile "io.netty:netty-codec-haproxy:${nettyVersion}"
|
2018-07-31 16:12:41 -04:00
|
|
|
compile "io.netty:netty-codec-http:${nettyVersion}"
|
|
|
|
compile "io.netty:netty-handler:${nettyVersion}"
|
|
|
|
compile "io.netty:netty-transport-native-epoll:${nettyVersion}"
|
|
|
|
compile "io.netty:netty-transport-native-epoll:${nettyVersion}:linux-x86_64"
|
2019-10-20 00:27:31 -04:00
|
|
|
compile "io.netty:netty-transport-native-kqueue:${nettyVersion}"
|
|
|
|
compile "io.netty:netty-transport-native-kqueue:${nettyVersion}:osx-x86_64"
|
2018-12-24 07:37:59 -05:00
|
|
|
compile "io.netty:netty-resolver-dns:${nettyVersion}"
|
2018-08-07 16:24:01 +02:00
|
|
|
|
2018-07-31 16:12:41 -04:00
|
|
|
compile "org.apache.logging.log4j:log4j-api:${log4jVersion}"
|
|
|
|
compile "org.apache.logging.log4j:log4j-core:${log4jVersion}"
|
2018-08-20 19:30:32 -04:00
|
|
|
compile "org.apache.logging.log4j:log4j-slf4j-impl:${log4jVersion}"
|
2018-12-29 13:30:50 -05:00
|
|
|
compile "org.apache.logging.log4j:log4j-iostreams:${log4jVersion}"
|
2018-08-07 16:24:01 +02:00
|
|
|
|
2018-11-20 21:48:11 -08:00
|
|
|
compile 'net.sf.jopt-simple:jopt-simple:5.0.4' // command-line options
|
2019-07-21 16:51:08 +02:00
|
|
|
compile 'net.minecrell:terminalconsoleappender:1.2.0'
|
2019-07-20 14:25:47 -04:00
|
|
|
runtime 'org.jline:jline-terminal-jansi:3.12.1' // Needed for JLine
|
2018-08-07 16:24:01 +02:00
|
|
|
runtime 'com.lmax:disruptor:3.4.2' // Async loggers
|
|
|
|
|
2019-07-20 14:25:47 -04:00
|
|
|
compile 'it.unimi.dsi:fastutil:8.2.3'
|
2018-08-20 19:30:32 -04:00
|
|
|
compile 'net.kyori:event-method-asm:3.0.0'
|
2018-08-10 18:32:27 -07:00
|
|
|
|
2018-12-29 09:28:24 -05:00
|
|
|
compile 'com.mojang:brigadier:1.0.15'
|
2019-07-26 01:29:43 -04:00
|
|
|
|
2019-10-20 00:27:31 -04:00
|
|
|
compile 'org.asynchttpclient:async-http-client:2.10.4'
|
2019-08-06 02:06:53 -04:00
|
|
|
|
|
|
|
compile 'com.spotify:completable-futures:0.3.2'
|
2018-12-29 09:28:24 -05:00
|
|
|
|
2018-07-31 16:12:41 -04:00
|
|
|
testCompile "org.junit.jupiter:junit-jupiter-api:${junitVersion}"
|
|
|
|
testCompile "org.junit.jupiter:junit-jupiter-engine:${junitVersion}"
|
|
|
|
}
|
|
|
|
|
2018-08-10 18:32:27 -07:00
|
|
|
shadowJar {
|
|
|
|
exclude 'it/unimi/dsi/fastutil/booleans/**'
|
|
|
|
exclude 'it/unimi/dsi/fastutil/bytes/**'
|
|
|
|
exclude 'it/unimi/dsi/fastutil/chars/**'
|
|
|
|
exclude 'it/unimi/dsi/fastutil/doubles/**'
|
|
|
|
exclude 'it/unimi/dsi/fastutil/floats/**'
|
|
|
|
exclude 'it/unimi/dsi/fastutil/ints/*Int2*'
|
|
|
|
exclude 'it/unimi/dsi/fastutil/ints/IntAVL*'
|
|
|
|
exclude 'it/unimi/dsi/fastutil/ints/IntArray*'
|
|
|
|
exclude 'it/unimi/dsi/fastutil/ints/IntBi*'
|
2018-12-29 13:30:50 -05:00
|
|
|
exclude 'it/unimi/dsi/fastutil/ints/IntLinked*'
|
2018-08-10 18:32:27 -07:00
|
|
|
exclude 'it/unimi/dsi/fastutil/ints/IntList*'
|
|
|
|
exclude 'it/unimi/dsi/fastutil/ints/IntOpen*'
|
|
|
|
exclude 'it/unimi/dsi/fastutil/ints/IntRB*'
|
|
|
|
exclude 'it/unimi/dsi/fastutil/ints/IntSet*'
|
|
|
|
exclude 'it/unimi/dsi/fastutil/ints/IntSorted*'
|
2018-12-29 13:30:50 -05:00
|
|
|
exclude 'it/unimi/dsi/fastutil/ints/*Priority*'
|
|
|
|
exclude 'it/unimi/dsi/fastutil/ints/*BigList*'
|
2018-08-10 18:32:27 -07:00
|
|
|
exclude 'it/unimi/dsi/fastutil/io/**'
|
|
|
|
exclude 'it/unimi/dsi/fastutil/longs/**'
|
|
|
|
exclude 'it/unimi/dsi/fastutil/objects/*ObjectArray*'
|
|
|
|
exclude 'it/unimi/dsi/fastutil/objects/*ObjectAVL*'
|
|
|
|
exclude 'it/unimi/dsi/fastutil/objects/*Object*Big*'
|
|
|
|
exclude 'it/unimi/dsi/fastutil/objects/*Object2Boolean*'
|
|
|
|
exclude 'it/unimi/dsi/fastutil/objects/*Object2Byte*'
|
|
|
|
exclude 'it/unimi/dsi/fastutil/objects/*Object2Char*'
|
|
|
|
exclude 'it/unimi/dsi/fastutil/objects/*Object2Double*'
|
|
|
|
exclude 'it/unimi/dsi/fastutil/objects/*Object2Float*'
|
|
|
|
exclude 'it/unimi/dsi/fastutil/objects/*Object2IntArray*'
|
|
|
|
exclude 'it/unimi/dsi/fastutil/objects/*Object2IntAVL*'
|
|
|
|
exclude 'it/unimi/dsi/fastutil/objects/*Object*OpenCustom*'
|
|
|
|
exclude 'it/unimi/dsi/fastutil/objects/*Object2IntRB*'
|
|
|
|
exclude 'it/unimi/dsi/fastutil/objects/*Object2Long*'
|
|
|
|
exclude 'it/unimi/dsi/fastutil/objects/*Object2Object*'
|
|
|
|
exclude 'it/unimi/dsi/fastutil/objects/*Object2Reference*'
|
|
|
|
exclude 'it/unimi/dsi/fastutil/objects/*Object2Short*'
|
|
|
|
exclude 'it/unimi/dsi/fastutil/objects/*ObjectRB*'
|
|
|
|
exclude 'it/unimi/dsi/fastutil/objects/*Reference*'
|
|
|
|
exclude 'it/unimi/dsi/fastutil/shorts/**'
|
2018-12-25 09:32:11 -05:00
|
|
|
exclude 'org/checkerframework/checker/**'
|
2018-08-10 18:32:27 -07:00
|
|
|
}
|
|
|
|
|
2018-07-31 16:12:41 -04:00
|
|
|
artifacts {
|
|
|
|
archives shadowJar
|
2018-08-07 16:24:01 +02:00
|
|
|
}
|