hqbhoho commented on code in PR #10092:
URL: https://github.com/apache/gravitino/pull/10092#discussion_r2870292612


##########
trino-connector/trino-connector-478/build.gradle.kts:
##########
@@ -0,0 +1,168 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import com.diffplug.gradle.spotless.SpotlessExtension
+import net.ltgt.gradle.errorprone.errorprone
+import org.gradle.internal.hash.ChecksumService
+import org.gradle.kotlin.dsl.support.serviceOf
+
+plugins {
+  `java-library`
+  `maven-publish`
+}
+
+// This module supports Trino versions 478+
+val minTrinoVersion = 478
+val maxTrinoVersion = 478
+val otelSemconvVersion = "1.32.0"
+
+val trinoVersion = providers.gradleProperty("trinoVersion")
+  .map { it.trim().toInt() }
+  .orElse(minTrinoVersion)
+  .get()
+
+// Validate version range
+check(trinoVersion in minTrinoVersion..maxTrinoVersion) {
+  "Module ${project.path} supports Trino versions 
$minTrinoVersion-$maxTrinoVersion, " +
+    "but trinoVersion=$trinoVersion was specified. " +
+    "Please set '-PtrinoVersion=$minTrinoVersion' (or any version in the 
supported range)."
+}
+
+java {
+  toolchain.languageVersion.set(JavaLanguageVersion.of(24))
+}
+
+dependencies {
+  implementation(project(":catalogs:catalog-common"))
+  implementation(project(":clients:client-java-runtime", configuration = 
"shadow"))
+  implementation(libs.airlift.json)
+  implementation(libs.bundles.log4j)
+  implementation(libs.commons.collections4)
+  implementation(libs.commons.lang3)
+  implementation("io.trino:trino-jdbc:$trinoVersion")
+  
runtimeOnly("io.opentelemetry.semconv:opentelemetry-semconv:$otelSemconvVersion")
+  compileOnly(libs.airlift.resolver)
+  compileOnly("io.trino:trino-spi:$trinoVersion") {
+    exclude("org.apache.logging.log4j")
+  }
+  testImplementation(libs.awaitility)
+  testImplementation(libs.mockito.core)
+  testImplementation(libs.mysql.driver)
+  testImplementation("io.trino:trino-memory:$trinoVersion") {
+    exclude("org.antlr")
+    exclude("org.apache.logging.log4j")
+  }
+  testImplementation("io.trino:trino-testing:$trinoVersion") {
+    exclude("org.apache.logging.log4j")
+    exclude("org.junit.jupiter")
+    exclude("org.junit.platform")
+  }
+  testImplementation(enforcedPlatform("org.junit:junit-bom:5.11.4"))
+  testImplementation("org.junit.jupiter:junit-jupiter-api")
+  testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine")

Review Comment:
   There is a dependency conflict here between JUnit (6.0.0) in the new 
`trino-testing` and JUnit (5.8.1) in `Gravitino`. To make the unit tests pass, 
I specified a specific version here. Do we need to add a `junit-5-11` version 
entry in `libs.versions.toml`.



-- 
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