This is an automated email from the ASF dual-hosted git repository. mgreber pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/kudu.git
The following commit(s) were added to refs/heads/master by this push: new 378de2052 KUDU-3697: Bundle kudu-spark classes 378de2052 is described below commit 378de205205689b5ba4effb980572db5dc58501a Author: Abhishek Chennaka <achenn...@apache.org> AuthorDate: Tue Sep 9 17:03:33 2025 -0700 KUDU-3697: Bundle kudu-spark classes Update the kudu-spark dependency configuration to implementation to ensure its classes are bundled into the kudu-backup and kudu-spark-tools JARs. Manually tweak the Gradle publishing process so that this dependency is declared as a compile-time dependency. There are likely better ways to address this, hence the TODO. This restores the previous behavior from before the Gradle upgrade: bundling kudu-spark into the subprojects while keeping the dependency scope as compile. Change-Id: I8d3e3c95efe161adc916332477f8cd9f35c48e38 Reviewed-on: http://gerrit.cloudera.org:8080/23407 Tested-by: Abhishek Chennaka <achenn...@cloudera.com> Reviewed-by: Zoltan Chovan <zcho...@cloudera.com> Reviewed-by: Marton Greber <greber...@gmail.com> --- java/gradle/publishing.gradle | 6 ++++++ java/kudu-backup/build.gradle | 2 +- java/kudu-spark-tools/build.gradle | 2 +- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/java/gradle/publishing.gradle b/java/gradle/publishing.gradle index a4ab32e59..12b7a938e 100644 --- a/java/gradle/publishing.gradle +++ b/java/gradle/publishing.gradle @@ -148,6 +148,12 @@ publishing { } } } + // TODO(achennaka): Find a cleaner fix to have the scope as compile instead of runtime + asNode().dependencies.dependency.findAll { + it.artifactId.text() ==~ /kudu-spark[0-9]*_.*/ + }.each { + it.scope*.value = "compile" // or remove it.parent().remove(it) if you want none + } } } } diff --git a/java/kudu-backup/build.gradle b/java/kudu-backup/build.gradle index c51d05ef2..d2525fde1 100644 --- a/java/kudu-backup/build.gradle +++ b/java/kudu-backup/build.gradle @@ -28,7 +28,7 @@ dependencies { exclude group: "org.scala-lang", module: "scala-library" } implementation project(path: ":kudu-client", configuration: "shadow") - compileOnlyApi project(path: ":kudu-spark", configuration: "shadow") + implementation project(path: ":kudu-spark", configuration: "shadow") implementation libs.protobufJava implementation (libs.scopt) { // Make sure wrong Scala version is not pulled in. diff --git a/java/kudu-spark-tools/build.gradle b/java/kudu-spark-tools/build.gradle index 7d6cc1b9f..2b9157e4a 100644 --- a/java/kudu-spark-tools/build.gradle +++ b/java/kudu-spark-tools/build.gradle @@ -21,7 +21,7 @@ apply from: "$rootDir/gradle/shadow.gradle" dependencies { implementation project(path: ":kudu-client", configuration: "shadow") - compileOnlyApi project(':kudu-spark') + implementation project(path: ":kudu-spark", configuration: "shadow") // TODO(KUDU-2500): Spark uses reflection which requires the annotations at runtime. implementation libs.yetusAnnotations implementation (libs.scopt) {