This is an automated email from the ASF dual-hosted git repository.

vterentev pushed a commit to branch fix-playground-ci-nightly
in repository https://gitbox.apache.org/repos/asf/beam.git


The following commit(s) were added to refs/heads/fix-playground-ci-nightly by 
this push:
     new beaf307edab Add sql's runtime classpath
beaf307edab is described below

commit beaf307edab910e60a12d739c2156692941e11b7
Author: Vitaly Terentyev <vitaly.terent...@akvelon.com>
AuthorDate: Wed Oct 1 23:06:53 2025 +0400

    Add sql's runtime classpath
---
 examples/java/build.gradle     | 11 +++++++++++
 examples/java/sql/build.gradle |  6 +-----
 2 files changed, 12 insertions(+), 5 deletions(-)

diff --git a/examples/java/build.gradle b/examples/java/build.gradle
index cdbcb5ce8bf..81e208ffaf3 100644
--- a/examples/java/build.gradle
+++ b/examples/java/build.gradle
@@ -184,3 +184,14 @@ task wordCount(type:JavaExec) {
   systemProperties = System.getProperties()
   args = ["--output=/tmp/output.txt"]
 }
+
+tasks.named("execute", JavaExec).configure {
+  doFirst {
+    // If we’re launching a class from the SQL submodule, include that 
subproject’s runtime CP
+    if (mainClass?.startsWith("org.apache.beam.examples") &&
+      // quick heuristic: all SQL examples live under the sql submodule
+      (mainClass?.toLowerCase()?.contains("sql") || 
mainClass?.contains("Sql"))) {
+      classpath = classpath + 
project(":examples:java:sql").sourceSets.main.runtimeClasspath
+    }
+  }
+}
diff --git a/examples/java/sql/build.gradle b/examples/java/sql/build.gradle
index b5e41ee4e4d..af61989f11c 100644
--- a/examples/java/sql/build.gradle
+++ b/examples/java/sql/build.gradle
@@ -54,16 +54,12 @@ configurations.sparkRunnerPreCommit {
 dependencies {
   implementation 
enforcedPlatform(library.java.google_cloud_platform_libraries_bom)
   implementation project(path: ":sdks:java:core", configuration: "shadow")
-  implementation project(path: ":sdks:java:extensions:sql", configuration: 
"shadow")
+  implementation project(":sdks:java:extensions:sql")
   implementation library.java.slf4j_api
-  implementation library.java.vendored_calcite_1_40_0
-  runtimeOnly library.java.vendored_calcite_1_40_0
   runtimeOnly project(path: ":runners:direct-java", configuration: "shadow")
   runtimeOnly library.java.hadoop_client
   runtimeOnly library.java.bigdataoss_gcs_connector
   testImplementation project(path: ":runners:direct-java", configuration: 
"shadow")
-  testImplementation project(path: ":sdks:java:extensions:sql", configuration: 
"shadow")
-  testImplementation library.java.vendored_calcite_1_40_0
   testImplementation library.java.hamcrest
   testImplementation library.java.junit
   testImplementation library.java.mockito_core

Reply via email to