Skip to content

Commit 2d5189c

Browse files
committed
Unpin antlr in BeamModulePlugins
1 parent de76cfa commit 2d5189c

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

buildSrc/src/main/groovy/org/apache/beam/gradle/BeamModulePlugin.groovy

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -674,8 +674,6 @@ class BeamModulePlugin implements Plugin<Project> {
674674
activemq_junit : "org.apache.activemq.tooling:activemq-junit:$activemq_version",
675675
activemq_kahadb_store : "org.apache.activemq:activemq-kahadb-store:$activemq_version",
676676
activemq_mqtt : "org.apache.activemq:activemq-mqtt:$activemq_version",
677-
antlr : "org.antlr:antlr4:4.7",
678-
antlr_runtime : "org.antlr:antlr4-runtime:4.7",
679677
args4j : "args4j:args4j:2.33",
680678
auto_value_annotations : "com.google.auto.value:auto-value-annotations:$autovalue_version",
681679
// TODO: https://github.com/apache/beam/issues/34993 after stopping supporting Java 8

sdks/java/core/build.gradle

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,9 @@
1717
*/
1818

1919
plugins { id 'org.apache.beam.module' }
20+
21+
def antlr_version = "4.7"
22+
2023
applyJavaNature(
2124
automaticModuleName: 'org.apache.beam.sdk',
2225
classesTriggerCheckerBugs: [
@@ -29,7 +32,8 @@ applyJavaNature(
2932
dependencies {
3033
include(dependency(library.java.commons_compress))
3134
include(dependency(library.java.commons_lang3))
32-
include(dependency(library.java.antlr_runtime))
35+
// Shade and repackage antlr runtime into Java core jar
36+
include(dependency("org.antlr:antlr4-runtime:$antlr_version"))
3337
}
3438
relocate "com.google.thirdparty", getJavaRelocatedPath("com.google.thirdparty")
3539
relocate "org.apache.commons.compress", getJavaRelocatedPath("org.apache.commons.compress")
@@ -70,10 +74,8 @@ test {
7074
}
7175

7276
dependencies {
73-
antlr library.java.antlr
7477
// antlr is used to generate code from sdks/java/core/src/main/antlr/
75-
permitUnusedDeclared library.java.antlr
76-
permitUsedUndeclared library.java.antlr_runtime
78+
antlr "org.antlr:antlr4:$antlr_version"
7779
// Required to load constants from the model, e.g. max timestamp for global window
7880
shadow project(path: ":model:pipeline", configuration: "shadow")
7981
shadow project(path: ":model:fn-execution", configuration: "shadow")

0 commit comments

Comments
 (0)