Bump com.diffplug.spotless from 6.5.2 to 6.18.0 in /lib/java (#2791)

diff --git a/lib/java/build.gradle b/lib/java/build.gradle
index 7459e1f..f04f34d 100644
--- a/lib/java/build.gradle
+++ b/lib/java/build.gradle
@@ -42,7 +42,7 @@
     id 'pmd'
     id 'com.github.johnrengelman.shadow' version '8.1.1'
     id "com.github.spotbugs" version "4.7.1"
-    id "com.diffplug.spotless" version "6.5.2"
+    id "com.diffplug.spotless" version "6.18.0"
 }
 
 description = 'Apache Thrift Java Library'