THRIFT-5699: java lib and build tool chain: gradle 8.0.2 (#2779)

diff --git a/lib/java/gradle/unitTests.gradle b/lib/java/gradle/unitTests.gradle
index 293bcca..1e7481b 100644
--- a/lib/java/gradle/unitTests.gradle
+++ b/lib/java/gradle/unitTests.gradle
@@ -24,7 +24,7 @@
     description = 'Assembles a jar archive containing the test classes.'
     project.test.dependsOn it
 
-    classifier 'test'
+    archiveClassifier = 'test'
     from sourceSets.test.output
 }