This is an automated email from the ASF dual-hosted git repository.
fanng pushed a commit to branch remove_release
in repository https://gitbox.apache.org/repos/asf/gravitino.git
The following commit(s) were added to refs/heads/remove_release by this push:
new 4f4d64dbf3 build: simplify JDK8 compatibility matching
4f4d64dbf3 is described below
commit 4f4d64dbf3d82b4782113abfcfcb3b1ee0d7216b
Author: fanng <[email protected]>
AuthorDate: Mon Mar 16 10:14:51 2026 +0800
build: simplify JDK8 compatibility matching
---
build.gradle.kts | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/build.gradle.kts b/build.gradle.kts
index 5832e9ba71..2d8b594631 100644
--- a/build.gradle.kts
+++ b/build.gradle.kts
@@ -332,8 +332,11 @@ subprojects {
mavenLocal()
}
- val jdk8CompatibleProjectNames = setOf("api", "common", "catalog-common",
"hadoop-common")
- val jdk8CompatibleProjectPrefixes = listOf(
+ val jdk8CompatibleProjectPathPrefixes = setOf(
+ ":api",
+ ":common",
+ ":catalogs:catalog-common",
+ ":catalogs:hadoop-common",
":maintenance:jobs",
":maintenance:optimizer-api",
":maintenance:gravitino-updaters",
@@ -342,14 +345,10 @@ subprojects {
":spark-connector",
":flink-connector"
)
- fun hasProjectPrefix(path: String, prefixes: List<String>): Boolean {
- return prefixes.any { path.startsWith(it) }
- }
fun compatibleWithJDK8(project: Project): Boolean {
val path = project.path.lowercase()
- val name = project.name.lowercase()
- return name in jdk8CompatibleProjectNames || hasProjectPrefix(path,
jdk8CompatibleProjectPrefixes)
+ return jdk8CompatibleProjectPathPrefixes.any { path.startsWith(it) }
}
extensions.extraProperties.set("excludePackagesForSparkConnector",
::excludePackagesForSparkConnector)
@@ -446,6 +445,7 @@ subprojects {
}
tasks.withType<JavaCompile>().configureEach {
+ // Keep Java compilation independent of the host's default charset.
options.encoding = "UTF-8"
options.errorprone.isEnabled.set(true)
options.errorprone.disableWarningsInGeneratedCode.set(true)