3
0
Mirror von https://github.com/PaperMC/Velocity.git synchronisiert 2024-11-16 21:10:30 +01:00
Velocity/proxy/build.gradle

158 Zeilen
6.2 KiB
Groovy

import com.github.jengelman.gradle.plugins.shadow.transformers.Log4j2PluginsCacheFileTransformer
plugins {
id 'java'
id 'checkstyle'
}
apply plugin: 'org.cadixdev.licenser'
apply from: '../gradle/checkstyle.gradle'
apply from: '../gradle/errorprone.gradle'
apply plugin: 'com.github.johnrengelman.shadow'
license {
header = project.rootProject.file('HEADER.txt')
}
java {
sourceCompatibility = JavaVersion.VERSION_11
targetCompatibility = JavaVersion.VERSION_11
}
test {
useJUnitPlatform()
}
jar {
manifest {
def buildNumber = System.getenv("BUILD_NUMBER")
2019-06-13 00:10:33 +02:00
def version
if (project.version.endsWith("-SNAPSHOT")) {
if (buildNumber != null) {
version = "${project.version}+g${project.ext.getCurrentShortRevision()}-b${buildNumber}"
} else {
version = "${project.version}+g${project.ext.getCurrentShortRevision()}"
}
2019-06-13 00:10:33 +02:00
} else {
version = "${project.version}"
}
2018-09-04 03:02:11 +02:00
attributes 'Main-Class': 'com.velocitypowered.proxy.Velocity'
attributes 'Implementation-Title': "Velocity"
2018-09-04 03:02:11 +02:00
attributes 'Implementation-Version': version
attributes 'Implementation-Vendor': "Velocity Contributors"
attributes 'Multi-Release': 'true'
2021-03-21 21:17:41 +01:00
attributes 'Add-Opens': 'java.base/java.lang'
}
}
shadowJar {
transform(Log4j2PluginsCacheFileTransformer)
}
2018-12-29 23:22:36 +01:00
tasks.withType(Checkstyle) {
exclude('**/com/velocitypowered/proxy/protocol/packet/*.java')
}
dependencies {
compileOnly "com.github.spotbugs:spotbugs-annotations:4.1.2"
implementation project(':velocity-api')
implementation project(':velocity-annotation-processor')
implementation project(':velocity-native')
implementation project(':velocity-proxy-core')
implementation "net.kyori:adventure-nbt:${adventureVersion}"
implementation "io.netty:netty-codec:${nettyVersion}"
implementation "io.netty:netty-codec-haproxy:${nettyVersion}"
implementation "io.netty:netty-codec-http:${nettyVersion}"
implementation "io.netty:netty-handler:${nettyVersion}"
implementation "io.netty:netty-transport-native-epoll:${nettyVersion}"
implementation "io.netty:netty-transport-native-epoll:${nettyVersion}:linux-x86_64"
2020-12-10 04:25:06 +01:00
implementation "io.netty:netty-transport-native-epoll:${nettyVersion}:linux-aarch_64"
implementation "org.apache.logging.log4j:log4j-core:${log4jVersion}"
implementation "org.apache.logging.log4j:log4j-slf4j-impl:${log4jVersion}"
implementation "org.apache.logging.log4j:log4j-iostreams:${log4jVersion}"
implementation "org.apache.logging.log4j:log4j-jul:${log4jVersion}"
implementation 'net.sf.jopt-simple:jopt-simple:5.0.4' // command-line options
implementation 'net.minecrell:terminalconsoleappender:1.2.0'
runtimeOnly 'org.jline:jline-terminal-jansi:3.16.0' // Needed for JLine
runtimeOnly 'com.lmax:disruptor:3.4.2' // Async loggers
implementation 'it.unimi.dsi:fastutil:8.4.1'
2018-08-11 03:32:27 +02:00
implementation 'org.asynchttpclient:async-http-client:2.12.1'
implementation 'com.spotify:completable-futures:0.3.3'
implementation 'com.electronwill.night-config:toml:3.6.3'
implementation 'org.bstats:bstats-base:2.2.0'
testImplementation "org.junit.jupiter:junit-jupiter-api:${junitVersion}"
testImplementation "org.junit.jupiter:junit-jupiter-engine:${junitVersion}"
}
2018-08-11 03:32:27 +02: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/**'
2021-05-17 17:38:28 +02:00
exclude 'it/unimi/dsi/fastutil/ints/*Int2Boolean*'
exclude 'it/unimi/dsi/fastutil/ints/*Int2Byte*'
exclude 'it/unimi/dsi/fastutil/ints/*Int2Char*'
exclude 'it/unimi/dsi/fastutil/ints/*Int2Double*'
exclude 'it/unimi/dsi/fastutil/ints/*Int2Float*'
exclude 'it/unimi/dsi/fastutil/ints/*Int2Int*'
exclude 'it/unimi/dsi/fastutil/ints/*Int2Long*'
exclude 'it/unimi/dsi/fastutil/ints/*Int2Short*'
2018-08-11 03:32:27 +02:00
exclude 'it/unimi/dsi/fastutil/ints/IntAVL*'
exclude 'it/unimi/dsi/fastutil/ints/IntArray*'
exclude 'it/unimi/dsi/fastutil/ints/IntBi*'
2018-12-29 19:30:50 +01:00
exclude 'it/unimi/dsi/fastutil/ints/IntLinked*'
2018-08-11 03:32:27 +02: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/IntSorted*'
2018-12-29 19:30:50 +01:00
exclude 'it/unimi/dsi/fastutil/ints/*Priority*'
exclude 'it/unimi/dsi/fastutil/ints/*BigList*'
2018-08-11 03:32:27 +02: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/*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*'
2021-06-18 22:18:15 +02:00
exclude 'it/unimi/dsi/fastutil/objects/*Reference2Byte*'
exclude 'it/unimi/dsi/fastutil/objects/*Reference2Char*'
exclude 'it/unimi/dsi/fastutil/objects/*Reference2Double*'
exclude 'it/unimi/dsi/fastutil/objects/*Reference2Float*'
exclude 'it/unimi/dsi/fastutil/objects/*Reference2Short*'
exclude 'it/unimi/dsi/fastutil/objects/*Reference2Long*'
exclude 'it/unimi/dsi/fastutil/objects/*Reference2Object*'
exclude 'it/unimi/dsi/fastutil/objects/*Reference2Reference*'
exclude 'it/unimi/dsi/fastutil/objects/*Reference2Boolean*'
2018-08-11 03:32:27 +02:00
exclude 'it/unimi/dsi/fastutil/shorts/**'
2018-12-25 15:32:11 +01:00
exclude 'org/checkerframework/checker/**'
relocate 'org.bstats', 'com.velocitypowered.proxy.bstats'
2018-08-11 03:32:27 +02:00
}
artifacts {
archives shadowJar
}