| /* |
| * 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', |
| 'MergingActiveWindowSetTest': 'https://github.com/typetools/checker-framework/issues/3776', |
| 'WindowFnTestUtils': 'https://github.com/typetools/checker-framework/issues/3776', |
| ], |
| shadowClosure: { |
| dependencies { |
| include(dependency("org.apache.commons:.*")) |
| include(dependency(library.java.antlr_runtime)) |
| } |
| relocate "com.google.thirdparty", getJavaRelocatedPath("com.google.thirdparty") |
| relocate "org.apache.commons", getJavaRelocatedPath("org.apache.commons") |
| relocate "org.antlr.v4", getJavaRelocatedPath("org.antlr.v4") |
| }, |
| disableLintWarnings: ['rawtypes'], // Avro-generated test code has rawtype errorss |
| ) |
| applyAvroNature() |
| 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:job-management", configuration: "shadow") |
| shadow library.java.vendored_bytebuddy_1_10_8 |
| shadow library.java.vendored_grpc_1_26_0 |
| shadow library.java.vendored_guava_26_0_jre |
| compile library.java.antlr_runtime |
| compile library.java.commons_compress |
| compile library.java.commons_lang3 |
| 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.avro |
| shadow library.java.snappy_java |
| shadow library.java.joda_time |
| provided library.java.junit |
| provided library.java.hamcrest_core |
| provided library.java.hamcrest_library |
| provided 'io.airlift:aircompressor:0.18' |
| provided '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_core |
| shadowTest library.java.hamcrest_library |
| shadowTest "com.esotericsoftware.kryo:kryo:2.21" |
| shadowTest library.java.quickcheck_core |
| shadowTest library.java.avro_tests |
| shadowTest library.java.zstd_jni |
| testRuntimeOnly library.java.slf4j_jdk14 |
| } |