FANNG1 commented on code in PR #7877: URL: https://github.com/apache/gravitino/pull/7877#discussion_r2250960474
########## build.gradle.kts: ########## @@ -273,21 +273,78 @@ subprojects { mavenLocal() } + fun CompatibleWithJDK8(project: Project): Boolean { + val name = project.name.lowercase() + val path = project.path.lowercase() + + if (path.startsWith(":client") || + path.startsWith(":spark-connector") || + path.startsWith(":flink-connector") || + path.startsWith(":bundles") + ) { + return true + } + + if (name == "api" || name == "common" || + name == "catalog-common" || name == "hadoop-common" + ) { + return true + } + + return false + } + + tasks.register("printJvm") { + group = "help" + description = "print JVM information" + + doLast { + + val compileJvmVersion = tasks.withType<JavaCompile>().firstOrNull()?.javaCompiler?.get() + ?.metadata?.languageVersion?.asInt() ?: "undefined" + + val testJvmVersion = tasks.withType<Test>().firstOrNull()?.javaLauncher?.get() + ?.metadata?.languageVersion?.asInt() ?: "undefined" + + val testJvmArgs = tasks.withType<Test>().firstOrNull()?.jvmArgs ?: listOf() + + val targetJvmVersion = (java.targetCompatibility?.majorVersion ?: "undefined") + + val sourceJvmVersion = (java.sourceCompatibility?.majorVersion ?: "undefined") + + println( + """ + |=== ${project.name} JVM information=== + | project path: ${project.path} + | JVM for compile: $compileJvmVersion + | JVM for test: $testJvmVersion + | JVM test args: $testJvmArgs + | target JVM version: $targetJvmVersion + | source JVM version: $sourceJvmVersion + |================================== + """.trimMargin() + ) + } + } + java { toolchain { // Some JDK vendors like Homebrew installed OpenJDK 17 have problems in building trino-connector: // It will cause tests of Trino-connector hanging forever on macOS, to avoid this issue and // other vendor-related problems, Gravitino will use the specified AMAZON OpenJDK 17 to build // Trino-connector on macOS. + val isRelease8 = project.hasProperty("release8") Review Comment: `release8` is something like we release all packages compatibility with JDK8, but the fact is we release server pacakge to JDK17 and client packages to JDK8, we need a more meaning name. -- 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: commits-unsubscr...@gravitino.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org