Switch over to Error Prone (now with NullAway!)

There is one major change: we now have a separate artifact for the annotation processor.

As for NullAway, we are currently exempting the clientbound join game/respawn packets. They are ugly and need to be refactored.
This commit is contained in:
Andrew Steinborn
2021-05-13 04:13:15 -04:00
parent c496d912ea
commit 3c41211163
79 changed files with 494 additions and 401 deletions

17
gradle/errorprone.gradle Normal file
View File

@@ -0,0 +1,17 @@
dependencies {
annotationProcessor("com.uber.nullaway:nullaway:0.9.1")
testAnnotationProcessor("com.uber.nullaway:nullaway:0.9.1")
errorprone("com.google.errorprone:error_prone_core:2.6.0")
}
tasks.withType(JavaCompile).configureEach {
options.errorprone {
allErrorsAsWarnings = true
error("NullAway")
option("NullAway:AnnotatedPackages", "com.velocitypowered")
option("NullAway:ExcludedClasses",
"com.velocitypowered.proxy.network.packet.clientbound.ClientboundJoinGamePacket," +
"com.velocitypowered.proxy.network.packet.clientbound.ClientboundRespawnPacket")
}
}