github.com/apache/beam/sdks/v2@v2.48.2/java/core/build.gradle (about) 1 /* 2 * Licensed to the Apache Software Foundation (ASF) under one 3 * or more contributor license agreements. See the NOTICE file 4 * distributed with this work for additional information 5 * regarding copyright ownership. The ASF licenses this file 6 * to you under the Apache License, Version 2.0 (the 7 * License); you may not use this file except in compliance 8 * with the License. You may obtain a copy of the License at 9 * 10 * http://www.apache.org/licenses/LICENSE-2.0 11 * 12 * Unless required by applicable law or agreed to in writing, software 13 * distributed under the License is distributed on an AS IS BASIS, 14 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 * See the License for the specific language governing permissions and 16 * limitations under the License. 17 */ 18 19 plugins { id 'org.apache.beam.module' } 20 applyJavaNature( 21 automaticModuleName: 'org.apache.beam.sdk', 22 classesTriggerCheckerBugs: [ 23 'DoFnTester': 'https://github.com/typetools/checker-framework/issues/3776', 24 'MergingActiveWindowSetTest': 'https://github.com/typetools/checker-framework/issues/3776', 25 'WindowFnTestUtils': 'https://github.com/typetools/checker-framework/issues/3776', 26 ], 27 shadowClosure: { 28 dependencies { 29 include(dependency(library.java.commons_compress)) 30 include(dependency(library.java.commons_lang3)) 31 include(dependency(library.java.antlr_runtime)) 32 } 33 relocate "com.google.thirdparty", getJavaRelocatedPath("com.google.thirdparty") 34 relocate "org.apache.commons.compress", getJavaRelocatedPath("org.apache.commons.compress") 35 relocate "org.apache.commons.lang3", getJavaRelocatedPath("org.apache.commons.lang3") 36 relocate "org.antlr.v4", getJavaRelocatedPath("org.antlr.v4") 37 }, 38 ) 39 applyAvroNature() 40 applyAntlrNature() 41 42 generateGrammarSource { 43 arguments += ["-visitor"] 44 } 45 46 description = "Apache Beam :: SDKs :: Java :: Core" 47 ext.summary = """Beam SDK Java All provides a simple, Java-based 48 interface for processing virtually any size data. This 49 artifact includes entire Apache Beam Java SDK.""" 50 51 processResources { 52 inputs.property('version', version) 53 inputs.property('sdk_version', sdk_version) 54 inputs.property('docker_image_default_repo_root', docker_image_default_repo_root) 55 inputs.property('docker_image_default_repo_prefix', docker_image_default_repo_prefix) 56 filter org.apache.tools.ant.filters.ReplaceTokens, tokens: [ 57 'pom.version': version, 58 'pom.sdk_version': sdk_version, 59 'pom.docker_image_default_repo_root': docker_image_default_repo_root, 60 'pom.docker_image_default_repo_prefix': docker_image_default_repo_prefix, 61 ] 62 } 63 64 // Exclude tests that need a runner 65 test { 66 systemProperty "beamUseDummyRunner", "true" 67 useJUnit { 68 excludeCategories "org.apache.beam.sdk.testing.NeedsRunner" 69 } 70 } 71 72 dependencies { 73 antlr library.java.antlr 74 // antlr is used to generate code from sdks/java/core/src/main/antlr/ 75 permitUnusedDeclared library.java.antlr 76 // Required to load constants from the model, e.g. max timestamp for global window 77 shadow project(path: ":model:pipeline", configuration: "shadow") 78 shadow project(path: ":model:job-management", configuration: "shadow") 79 shadow library.java.vendored_grpc_1_54_0 80 shadow library.java.vendored_guava_26_0_jre 81 shadow library.java.byte_buddy 82 implementation library.java.antlr_runtime 83 implementation library.java.commons_compress 84 implementation library.java.commons_lang3 85 testImplementation library.java.mockito_inline 86 shadow library.java.jsr305 87 shadow library.java.error_prone_annotations 88 shadow library.java.jackson_core 89 shadow library.java.jackson_annotations 90 shadow library.java.jackson_databind 91 shadow library.java.slf4j_api 92 shadow library.java.avro 93 shadow library.java.snappy_java 94 shadow library.java.joda_time 95 implementation enforcedPlatform(library.java.google_cloud_platform_libraries_bom) 96 permitUnusedDeclared enforcedPlatform(library.java.google_cloud_platform_libraries_bom) 97 provided library.java.json_org 98 // com.github.everit JSON schema validation library is used for json-schema.org validation. 99 // to avoid forcing the library onto users, we ask users to provide it rather than include 100 // it by default. 101 // It is only used for optional functionality in JsonUtils schema parsing and conversion. 102 provided library.java.everit_json_schema 103 shadowTest library.java.everit_json_schema 104 provided library.java.junit 105 provided library.java.hamcrest 106 provided 'io.airlift:aircompressor:0.18' 107 provided 'com.facebook.presto.hadoop:hadoop-apache2:3.2.0-1' 108 provided library.java.zstd_jni 109 permitUnusedDeclared 'com.facebook.presto.hadoop:hadoop-apache2:3.2.0-1' 110 shadowTest library.java.jackson_dataformat_yaml 111 shadowTest library.java.guava_testlib 112 shadowTest library.java.mockito_core 113 shadowTest library.java.hamcrest 114 shadowTest "com.esotericsoftware.kryo:kryo:2.21" 115 shadowTest library.java.quickcheck_core 116 shadowTest library.java.quickcheck_generators 117 shadowTest library.java.avro_tests 118 shadowTest library.java.zstd_jni 119 shadowTest library.java.commons_logging 120 shadowTest library.java.log4j 121 shadowTest library.java.log4j2_api 122 shadowTest library.java.jamm 123 testRuntimeOnly library.java.slf4j_jdk14 124 } 125 126 project.tasks.compileTestJava { 127 options.compilerArgs += ['-Xlint:-rawtypes'] // generated avro uses rawtypes without suppression 128 }