blob: 5a47cb5237ea173e27b209bd1a437872cd72be1c [file] [log] [blame]
/*
* 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' }
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))
include(dependency(library.java.antlr_runtime))
}
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 library.java.antlr
// antlr is used to generate code from sdks/java/core/src/main/antlr/
permitUnusedDeclared library.java.antlr
// 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_60_1
shadow library.java.vendored_guava_32_1_2_jre
shadow library.java.byte_buddy
shadow library.java.antlr_runtime
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 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 "org.yaml:snakeyaml:2.0"
shadowTest library.java.everit_json_schema
provided library.java.junit
testImplementation "com.github.stefanbirkner:system-rules:1.19.0"
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
testImplementation "com.github.stefanbirkner:system-rules:1.19.0"
}
project.tasks.compileTestJava {
// TODO: fix other places with warnings in tests and delete this option
options.compilerArgs += ['-Xlint:-rawtypes']
}