Skip to content

Commit

Permalink
Fix to use java-core shadowjar as source to build direct-runner-java
Browse files Browse the repository at this point in the history
  • Loading branch information
Abacn committed Nov 6, 2024
1 parent 10189e8 commit 372338c
Showing 1 changed file with 12 additions and 10 deletions.
22 changes: 12 additions & 10 deletions runners/direct-java/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,12 @@ plugins { id 'org.apache.beam.module' }
// Shade away runner execution utilities till because this causes ServiceLoader conflicts with
// TransformPayloadTranslatorRegistrar amongst other runners. This only happens in the DirectRunner
// because it is likely to appear on the classpath of another runner.
def dependOnProjects = [
":runners:core-java",
":runners:local-java",
":runners:java-fn-execution",
":sdks:java:core",
]
def dependOnProjectsAndConfigs = [
":runners:core-java":null,
":runners:local-java":null,
":runners:java-fn-execution":null,
":sdks:java:core":"shadow",
]

applyJavaNature(
automaticModuleName: 'org.apache.beam.runners.direct',
Expand All @@ -36,8 +36,8 @@ applyJavaNature(
],
shadowClosure: {
dependencies {
dependOnProjects.each {
include(project(path: it, configuration: "shadow"))
dependOnProjectsAndConfigs.each {
include(project(path: it.key, configuration: "shadow"))
}
}
},
Expand All @@ -63,8 +63,10 @@ configurations {
dependencies {
shadow library.java.vendored_guava_32_1_2_jre
shadow project(path: ":model:pipeline", configuration: "shadow")
dependOnProjects.each {
implementation project(it)
dependOnProjectsAndConfigs.each {
// For projects producing shadowjar, use the packaged jar as dependency to
// handle redirected packages from it
implementation project(path: it.key, configuration: it.value)
}
shadow library.java.vendored_grpc_1_60_1
shadow library.java.joda_time
Expand Down

0 comments on commit 372338c

Please sign in to comment.