Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -674,8 +674,6 @@ class BeamModulePlugin implements Plugin<Project> {
activemq_junit : "org.apache.activemq.tooling:activemq-junit:$activemq_version",
activemq_kahadb_store : "org.apache.activemq:activemq-kahadb-store:$activemq_version",
activemq_mqtt : "org.apache.activemq:activemq-mqtt:$activemq_version",
antlr : "org.antlr:antlr4:4.7",
antlr_runtime : "org.antlr:antlr4-runtime:4.7",
args4j : "args4j:args4j:2.33",
auto_value_annotations : "com.google.auto.value:auto-value-annotations:$autovalue_version",
// TODO: https://github.com/apache/beam/issues/34993 after stopping supporting Java 8
Expand Down
13 changes: 9 additions & 4 deletions sdks/java/core/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@
*/

plugins { id 'org.apache.beam.module' }

def antlr_version = "4.7"

applyJavaNature(
automaticModuleName: 'org.apache.beam.sdk',
classesTriggerCheckerBugs: [
Expand All @@ -29,7 +32,8 @@ applyJavaNature(
dependencies {
include(dependency(library.java.commons_compress))
include(dependency(library.java.commons_lang3))
include(dependency(library.java.antlr_runtime))
// Shade and repackage antlr runtime into Java core jar
include(dependency("org.antlr:antlr4-runtime:$antlr_version"))
}
relocate "com.google.thirdparty", getJavaRelocatedPath("com.google.thirdparty")
relocate "org.apache.commons.compress", getJavaRelocatedPath("org.apache.commons.compress")
Expand Down Expand Up @@ -70,10 +74,11 @@ test {
}

dependencies {
antlr library.java.antlr
// antlr is used to generate code from sdks/java/core/src/main/antlr/
permitUnusedDeclared library.java.antlr
permitUsedUndeclared library.java.antlr_runtime
antlr "org.antlr:antlr4:$antlr_version"
permitUnusedDeclared "org.antlr:antlr4:$antlr_version"
// alrady shaded and repackaged
permitUsedUndeclared "org.antlr:antlr4-runtime:$antlr_version"
// Required to load constants from the model, e.g. max timestamp for global window
shadow project(path: ":model:pipeline", configuration: "shadow")
shadow project(path: ":model:fn-execution", configuration: "shadow")
Expand Down
Loading