An Easter basket bearing gifts! (#191)
* 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.
This commit is contained in:
@@ -1,70 +0,0 @@
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
/// Checker Framework pluggable type-checking
|
||||
///
|
||||
|
||||
repositories {
|
||||
mavenCentral()
|
||||
}
|
||||
|
||||
configurations {
|
||||
checkerFrameworkCheckerJar {
|
||||
description = 'the Checker Framework, including the Type Annotations compiler'
|
||||
}
|
||||
|
||||
checkerFrameworkAnnotatedJDK {
|
||||
description = 'a copy of JDK classes with Checker Framework type qualifers inserted'
|
||||
}
|
||||
}
|
||||
|
||||
// By default, use Checker Framework from Maven Central.
|
||||
// Pass -PcfLocal to use a locally-built version of the Checker Framework.
|
||||
dependencies {
|
||||
if (!rootProject.hasProperty('cfLocal')) {
|
||||
checkerFrameworkAnnotatedJDK "org.checkerframework:jdk8:${checkerFrameworkVersion}"
|
||||
checkerFrameworkCheckerJar "org.checkerframework:checker:${checkerFrameworkVersion}"
|
||||
implementation "org.checkerframework:checker-qual:${checkerFrameworkVersion}"
|
||||
} else if (System.getenv("CHECKERFRAMEWORK") == null) {
|
||||
throw new GradleException("Environment variable CHECKERFRAMEWORK is not set")
|
||||
} else if (!file(System.getenv("CHECKERFRAMEWORK")).exists()) {
|
||||
throw new GradleException("Environment variable CHECKERFRAMEWORK is set to non-existent directory " + System.getenv("CHECKERFRAMEWORK"));
|
||||
} else {
|
||||
ext.checkerframeworkdist = "$System.env.CHECKERFRAMEWORK/checker/dist"
|
||||
checkerFrameworkAnnotatedJDK fileTree(dir: "${ext.checkerframeworkdist}", include: "jdk8.jar")
|
||||
checkerFrameworkCheckerJar fileTree(dir: "${ext.checkerframeworkdist}", include: 'checker.jar')
|
||||
implementation fileTree(dir: "${ext.checkerframeworkdist}", include: 'checker-qual.jar')
|
||||
}
|
||||
}
|
||||
|
||||
// // To type-check all projects.
|
||||
// allprojects {
|
||||
// tasks.withType(JavaCompile).all { JavaCompile compile ->
|
||||
// compile.doFirst {
|
||||
// compile.options.compilerArgs = [
|
||||
// '-processor', 'org.checkerframework.checker.formatter.FormatterChecker,org.checkerframework.checker.index.IndexChecker,org.checkerframework.checker.lock.LockChecker,org.checkerframework.checker.nullness.NullnessChecker,org.checkerframework.checker.signature.SignatureChecker',
|
||||
// '-Xmaxerrs', '10000',
|
||||
// '-Awarns', // -Awarns turns Checker Framework errors into warnings
|
||||
// '-AcheckPurityAnnotations',
|
||||
// '-processorpath', "${configurations.checkerFrameworkCheckerJar.asPath}",
|
||||
// "-Xbootclasspath/p:${configurations.checkerFrameworkAnnotatedJDK.asPath}",
|
||||
// "-Astubs=$System.env.CHECKERFRAMEWORK/checker/resources/javadoc.astub" // TODO: does not work when downloading from Maven Central
|
||||
// ]
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
|
||||
// To typecheck only the current project's main source set (in a multi-project
|
||||
// build), use this instead:
|
||||
compileJava {
|
||||
doFirst {
|
||||
options.compilerArgs = [
|
||||
'-processor', 'org.checkerframework.checker.nullness.NullnessChecker',
|
||||
'-processor', 'org.checkerframework.checker.optional.OptionalChecker',
|
||||
'-Xmaxerrs', '10000',
|
||||
'-Xmaxwarns', '10000',
|
||||
// '-Awarns', // -Awarns turns Checker Framework errors into warnings
|
||||
//'-AcheckPurityAnnotations', // Disabled for Velocity, wish we could do better
|
||||
'-processorpath', "${configurations.checkerFrameworkCheckerJar.asPath}",
|
||||
"-Xbootclasspath/p:${configurations.checkerFrameworkAnnotatedJDK.asPath}"
|
||||
]
|
||||
}
|
||||
}
|
4
gradle/errorprone.gradle
Normal file
4
gradle/errorprone.gradle
Normal file
@@ -0,0 +1,4 @@
|
||||
dependencies {
|
||||
errorprone("com.google.errorprone:error_prone_core:2.3.3")
|
||||
errorproneJavac("com.google.errorprone:javac:9+181-r4173-1")
|
||||
}
|
2
gradle/wrapper/gradle-wrapper.properties
vendored
2
gradle/wrapper/gradle-wrapper.properties
vendored
@@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
zipStorePath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-4.10-all.zip
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-5.4-all.zip
|
||||
|
Reference in New Issue
Block a user