Mirror von
https://github.com/PaperMC/Velocity.git
synchronisiert 2024-12-25 15:50:19 +01:00
1661cece2d
* Delay switch to new server until after JoinGame is sent. Unfortunately, in some cases (especially vanilla Minecraft) some login disconnects are sent after ServerLoginSuccess but before JoinGame. We've been using ServerLoginSuccess but it has caused too many problems. Now Velocity will switch to a stripped-down version of the play session handler until JoinGame is received. This handler does very little by itself: it simply forwards plugin messages (for Forge) and waits for the JoinGame packet from the server. This is an initial version: only vanilla Minecraft 1.12.2 was tested. However this is the way Waterfall without entity rewriting does server switches (which, in turn, is inherited from BungeeCord). * Move to Gradle 5 and Error Prone.
91 Zeilen
2.2 KiB
Groovy
91 Zeilen
2.2 KiB
Groovy
plugins {
|
|
id 'java'
|
|
id 'maven-publish'
|
|
id 'checkstyle'
|
|
id "net.ltgt.errorprone" version "0.8"
|
|
}
|
|
|
|
apply from: '../gradle/checkstyle.gradle'
|
|
apply from: '../gradle/errorprone.gradle'
|
|
apply plugin: 'com.github.johnrengelman.shadow'
|
|
|
|
sourceSets {
|
|
ap {
|
|
compileClasspath += main.compileClasspath + main.output
|
|
}
|
|
}
|
|
|
|
dependencies {
|
|
compile 'com.google.code.gson:gson:2.8.5'
|
|
compile "com.google.guava:guava:${guavaVersion}"
|
|
compile 'net.kyori:text:1.12-1.6.5'
|
|
compile 'com.moandjiezana.toml:toml4j:0.7.2'
|
|
compile "org.slf4j:slf4j-api:${slf4jVersion}"
|
|
compile 'com.google.inject:guice:4.2.0'
|
|
compile "org.checkerframework:checker-qual:${checkerFrameworkVersion}"
|
|
|
|
testCompile "org.junit.jupiter:junit-jupiter-api:${junitVersion}"
|
|
testCompile "org.junit.jupiter:junit-jupiter-engine:${junitVersion}"
|
|
}
|
|
|
|
task javadocJar(type: Jar) {
|
|
classifier 'javadoc'
|
|
from javadoc
|
|
}
|
|
|
|
task sourcesJar(type: Jar) {
|
|
classifier 'sources'
|
|
from sourceSets.main.allSource
|
|
from sourceSets.ap.output
|
|
}
|
|
|
|
jar {
|
|
from sourceSets.ap.output
|
|
}
|
|
|
|
shadowJar {
|
|
from sourceSets.ap.output
|
|
}
|
|
|
|
artifacts {
|
|
archives javadocJar
|
|
archives shadowJar
|
|
archives sourcesJar
|
|
}
|
|
|
|
javadoc {
|
|
options.encoding = 'UTF-8'
|
|
options.charSet = 'UTF-8'
|
|
options.links(
|
|
'http://www.slf4j.org/apidocs/',
|
|
'https://google.github.io/guava/releases/25.1-jre/api/docs/',
|
|
'https://google.github.io/guice/api-docs/4.2/javadoc/',
|
|
'https://jd.kyori.net/text/1.12-1.6.4/',
|
|
'https://docs.oracle.com/javase/8/docs/api/'
|
|
)
|
|
|
|
// Disable the crazy super-strict doclint tool in Java 8
|
|
options.addStringOption('Xdoclint:none', '-quiet')
|
|
}
|
|
|
|
publishing {
|
|
publications {
|
|
mavenJava(MavenPublication) {
|
|
from components.java
|
|
|
|
artifact sourcesJar
|
|
artifact javadocJar
|
|
}
|
|
}
|
|
|
|
repositories {
|
|
maven {
|
|
name = 'myRepo'
|
|
def base = 'file:///maven-repo'
|
|
def releasesRepoUrl = "$base/releases"
|
|
def snapshotsRepoUrl = "$base/snapshots"
|
|
url = version.endsWith('SNAPSHOT') ? snapshotsRepoUrl : releasesRepoUrl
|
|
}
|
|
}
|
|
}
|