-
Notifications
You must be signed in to change notification settings - Fork 4.6k
Expand file tree
/
Copy pathbuild.gradle
More file actions
142 lines (132 loc) · 5.74 KB
/
build.gradle
File metadata and controls
142 lines (132 loc) · 5.74 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* License); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an AS IS BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
plugins { id 'org.apache.beam.module' }
def antlr_version = "4.7"
applyJavaNature(
automaticModuleName: 'org.apache.beam.sdk',
classesTriggerCheckerBugs: [
'DoFnTester': 'https://github.com/typetools/checker-framework/issues/3776',
'FileIO': 'https://github.com/typetools/checker-framework/issues/6388',
'MergingActiveWindowSetTest': 'https://github.com/typetools/checker-framework/issues/3776',
'WindowFnTestUtils': 'https://github.com/typetools/checker-framework/issues/3776',
],
shadowClosure: {
dependencies {
include(dependency(library.java.commons_compress))
include(dependency(library.java.commons_lang3))
// 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")
relocate "org.apache.commons.lang3", getJavaRelocatedPath("org.apache.commons.lang3")
relocate "org.antlr.v4", getJavaRelocatedPath("org.antlr.v4")
},
)
applyAntlrNature()
generateGrammarSource {
arguments += ["-visitor"]
}
description = "Apache Beam :: SDKs :: Java :: Core"
ext.summary = """Beam SDK Java All provides a simple, Java-based
interface for processing virtually any size data. This
artifact includes entire Apache Beam Java SDK."""
processResources {
inputs.property('version', version)
inputs.property('sdk_version', sdk_version)
inputs.property('docker_image_default_repo_root', docker_image_default_repo_root)
inputs.property('docker_image_default_repo_prefix', docker_image_default_repo_prefix)
filter org.apache.tools.ant.filters.ReplaceTokens, tokens: [
'pom.version': version,
'pom.sdk_version': sdk_version,
'pom.docker_image_default_repo_root': docker_image_default_repo_root,
'pom.docker_image_default_repo_prefix': docker_image_default_repo_prefix,
]
}
// Exclude tests that need a runner
test {
systemProperty "beamUseDummyRunner", "true"
useJUnit {
excludeCategories "org.apache.beam.sdk.testing.NeedsRunner"
}
}
dependencies {
// antlr is used to generate code from sdks/java/core/src/main/antlr/
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")
shadow project(path: ":model:job-management", configuration: "shadow")
shadow project(path: ":sdks:java:transform-service:launcher")
shadow library.java.vendored_grpc_1_69_0
shadow library.java.vendored_guava_32_1_2_jre
shadow library.java.byte_buddy
shadow library.java.commons_compress
shadow library.java.commons_lang3
testImplementation library.java.mockito_inline
shadow library.java.classgraph
shadow library.java.jsr305
shadow library.java.error_prone_annotations
shadow library.java.jackson_core
shadow library.java.jackson_annotations
shadow library.java.jackson_databind
shadow platform(library.java.opentelemetry_instrumentation_bom)
shadow library.java.opentelemetry_api
shadow library.java.slf4j_api
shadow library.java.snappy_java
shadow library.java.joda_time
implementation enforcedPlatform(library.java.google_cloud_platform_libraries_bom)
permitUnusedDeclared enforcedPlatform(library.java.google_cloud_platform_libraries_bom)
provided library.java.json_org
implementation library.java.everit_json_schema
implementation library.java.snake_yaml
shadowTest library.java.everit_json_schema
provided library.java.junit
provided library.java.hamcrest
provided 'io.airlift:aircompressor:0.18'
provided 'com.facebook.presto.hadoop:hadoop-apache2:3.2.0-1'
provided library.java.zstd_jni
permitUnusedDeclared 'com.facebook.presto.hadoop:hadoop-apache2:3.2.0-1'
shadowTest library.java.jackson_dataformat_yaml
shadowTest library.java.guava_testlib
shadowTest library.java.mockito_core
shadowTest library.java.hamcrest
shadowTest "com.esotericsoftware.kryo:kryo:2.21"
shadowTest library.java.quickcheck_core
shadowTest library.java.quickcheck_generators
shadowTest library.java.zstd_jni
shadowTest library.java.commons_logging
shadowTest library.java.log4j
shadowTest library.java.log4j2_api
shadowTest library.java.jamm
testRuntimeOnly library.java.slf4j_jdk14
}
project.tasks.compileTestJava {
// TODO: fix other places with warnings in tests and delete this option
options.compilerArgs += ['-Xlint:-rawtypes']
}
// Configure test task to use JUnit 4. JUnit 5 support is provided in module
// sdks/java/testing/junit, which configures useJUnitPlatform(). Submodules that
// need to run both JUnit 4 and 5 via the JUnit Platform must also add the
// Vintage engine explicitly.
test {
useJUnit()
}