Remove some gradle deprecation warnings (#3039)

These are trivial changes for the java/kotlin libraries.

* Specify JUnit platform explicitly
* Remove unused system property (build.test) from unit test environment
  that relied on a deprecated task property (destinationDir)
* Replace kotlinOptions.jvmTarget with compilerOptions replacement
* Update README to avoid incorrect specification of gradle 8.0, when
  other gradle 8 versions are acceptable
diff --git a/lib/java/README.md b/lib/java/README.md
index c65f97c..8881da6 100644
--- a/lib/java/README.md
+++ b/lib/java/README.md
@@ -42,7 +42,7 @@
 the Gradle build system, which tends to be predominant amongst Java
 developers.
 
-Currently we use gradle 8.0 to build the Thrift Java source. The usual way to setup gradle
+Currently we use gradle 8 to build the Thrift Java source. The usual way to setup gradle
 project is to include the gradle-wrapper.jar in the project and then run the gradle wrapper to
 bootstrap setting up gradle binaries. However to avoid putting binary files into the source tree we
 have ignored the gradle wrapper files. You are expected to install it manually, as described in
diff --git a/lib/java/gradle/environment.gradle b/lib/java/gradle/environment.gradle
index 977c07e..7e05b87 100644
--- a/lib/java/gradle/environment.gradle
+++ b/lib/java/gradle/environment.gradle
@@ -69,5 +69,6 @@
 
     testImplementation "org.junit.jupiter:junit-jupiter:${junitVersion}"
     testImplementation "org.mockito:mockito-core:${mockitoVersion}"
+    testRuntimeOnly "org.junit.platform:junit-platform-launcher"
     testRuntimeOnly "org.slf4j:slf4j-log4j12:${slf4jVersion}"
 }
diff --git a/lib/java/gradle/unitTests.gradle b/lib/java/gradle/unitTests.gradle
index 4f06fcf..6f63956 100644
--- a/lib/java/gradle/unitTests.gradle
+++ b/lib/java/gradle/unitTests.gradle
@@ -79,7 +79,6 @@
     maxHeapSize = '512m'
 
     systemProperties = [
-        'build.test': "${compileTestJava.destinationDir}",
         'test.port': "${testPort}",
         'javax.net.ssl.trustStore': "${projectDir}/src/crossTest/resources/.truststore",
         'javax.net.ssl.trustStorePassword': 'thrift',
diff --git a/lib/kotlin/build.gradle.kts b/lib/kotlin/build.gradle.kts
index 6b1c7c9..3f8b653 100644
--- a/lib/kotlin/build.gradle.kts
+++ b/lib/kotlin/build.gradle.kts
@@ -41,7 +41,9 @@
 }
 
 tasks.withType<org.jetbrains.kotlin.gradle.tasks.KotlinCompile> {
-    kotlinOptions.jvmTarget = "1.8"
+    compilerOptions {
+        jvmTarget = org.jetbrains.kotlin.gradle.dsl.JvmTarget.JVM_1_8
+    }
 }
 
 tasks {