THRIFT-5553: use newer gradle API (#2561)

Prepare for moving to Gradle 7 by removing use of older Gradle directives
(except the use of maven; the transition to maven-publish is not included here)
diff --git a/lib/java/build.gradle b/lib/java/build.gradle
index 726d7b7..3e750fd 100644
--- a/lib/java/build.gradle
+++ b/lib/java/build.gradle
@@ -39,7 +39,7 @@
     id 'java-library'
     id 'maven'
     id 'signing'
-    id 'com.github.johnrengelman.shadow' version '4.0.4'
+    id 'com.github.johnrengelman.shadow' version '6.1.0'
     id "com.github.spotbugs" version "4.7.1"
     id "com.diffplug.spotless" version "6.4.2"
 }