Add ArchUnit rule to ban javax & JetBrains nullability annotations by dondonz · Pull Request #3985 · graphql-java/graphql-java

Going forward we will be using JSpecify Nullability annotations.

It's possible to accidentally pull in the old javax Nullability annotations because this doesn't need any changes to our build.gradle dependencies.

While it's unlikely someone would accidentally add JetBrains Nullability annotations, because these require a new dependency to be added, I have also banned them.

Sample test output when a banned usage is found:

We are using JSpecify nullability annotations only. Please change the following to use JSpecify instead:
- Parameter <java.util.concurrent.CompletableFuture<T>> of method <graphql.execution.Async.orNullCompletedFuture(java.util.concurrent.CompletableFuture)> is annotated with <javax.annotation.Nullable> in (Async.java:0)