FANNG1 commented on code in PR #7827:
URL: https://github.com/apache/gravitino/pull/7827#discussion_r2241443971


##########
build.gradle.kts:
##########
@@ -105,6 +106,53 @@ project.extra["extraJvmArgs"] = if (extra["jdkVersion"] in 
listOf("8", "11")) {
   )
 }
 
+fun useHighVersionJDK(project: Project): Boolean {
+  val name = project.name.lowercase()
+  val path = project.path.lowercase()
+
+  // bundles module rely on catalog-fileset module
+  if (name == "catalog-common" || name == "hadoop-common" || name == 
"catalog-fileset") {
+    return false
+  }
+
+  if (path.startsWith(":catalogs:") || path.startsWith(":iceberg:") || 
path.startsWith(":authorizations:")) {
+    return true
+  }
+
+  if (path == ":trino-connector:integration-test" || path == 
":web:integration-test") {
+    return true
+  }
+
+  if (name in listOf("server", "lineage")) {
+    return true
+  }
+
+  // All ITs could only run embedded mode in JDK17
+  if (path.startsWith(":integration-test:") && 
rootProject.extra["isTestModeEmbedded"] == true) {
+    return true
+  }
+
+  return false
+}
+
+// Use JDK 17 for embedded mode, use the JDK from `jdkVersion` for deploy mode
+fun getJdkVersionForTest(project: Project): JavaLanguageVersion {
+  if (rootProject.extra["isTestModeEmbedded"] == true) {
+    return JavaLanguageVersion.of(17)

Review Comment:
   ok



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to