THRIFT-5564: setup cross test in GitHub action (#2602)

* include java and kotlin into precross
diff --git a/lib/kotlin/build.gradle.kts b/lib/kotlin/build.gradle.kts
index 842c1b9..1f7711a 100644
--- a/lib/kotlin/build.gradle.kts
+++ b/lib/kotlin/build.gradle.kts
@@ -34,6 +34,12 @@
     testImplementation(kotlin("test"))
 }
 
+kotlin {
+    jvmToolchain {
+        (this as JavaToolchainSpec).languageVersion.set(JavaLanguageVersion.of(8))
+    }
+}
+
 tasks {
     ktfmt {
         kotlinLangStyle()