github.com/apache/beam/sdks/v2@v2.48.2/java/harness/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  
    21  configurations {
    22    provided
    23  }
    24  
    25  dependencies {
    26    // provided dependencies are declared early so they can be resolved in shadowClosure
    27    provided enforcedPlatform(library.java.google_cloud_platform_libraries_bom)
    28  
    29    // :sdks:java:core and transitive dependencies
    30    provided project(path: ":model:pipeline", configuration: "shadow")
    31    provided project(path: ":sdks:java:core", configuration: "shadow")
    32    provided library.java.joda_time
    33    provided library.java.slf4j_api
    34    provided library.java.vendored_grpc_1_54_0
    35    provided library.java.vendored_guava_26_0_jre
    36  
    37    provided library.java.jamm
    38  }
    39  
    40  applyJavaNature(
    41    classesTriggerCheckerBugs: [
    42      'AssignWindowsRunner': 'https://github.com/typetools/checker-framework/issues/3794',
    43      'WindowMergingFnRunner': 'https://github.com/typetools/checker-framework/issues/3794',
    44      'FnApiDoFnRunner': 'https://github.com/typetools/checker-framework/issues/5436',
    45    ],
    46    automaticModuleName: 'org.apache.beam.fn.harness',
    47    testShadowJar: true,
    48    shadowJarValidationExcludes: [
    49      "junit/**",
    50      "io/github/classgraph/**",
    51      "nonapi/io/github/classgraph/**",
    52      "org/apache/beam/fn/harness/**",
    53      "org/apache/beam/model/fnexecution/**",
    54      "org/apache/beam/runners/core/**",
    55      "org/apache/beam/runners/core/construction/**",
    56      "org/apache/beam/sdk/extensions/avro/**",
    57      "org/apache/beam/sdk/fn/**",
    58      "org/checkerframework/**",
    59      "org/hamcrest/**",
    60      "org/junit/**",
    61    ],
    62    shadowClosure:
    63    {
    64      dependencies {
    65        // Exclude provided and transient dependencies
    66        project.configurations.provided.getResolvedConfiguration()
    67            .getLenientConfiguration().getAllModuleDependencies().each {
    68          exclude(dependency(it.getModuleGroup() + ":" + it.getModuleName() + ":.*"))
    69        }
    70      }
    71    },
    72  )
    73  
    74  description = "Apache Beam :: SDKs :: Java :: Harness"
    75  ext.summary = "This contains the SDK Fn Harness for Beam Java"
    76  
    77  dependencies {
    78    implementation enforcedPlatform(library.java.google_cloud_platform_libraries_bom)
    79    implementation project(path: ":model:fn-execution", configuration: "shadow")
    80    implementation project(":runners:core-construction-java")
    81    implementation project(":runners:core-java")
    82    implementation project(":sdks:java:fn-execution")
    83    testImplementation library.java.junit
    84    testImplementation library.java.mockito_core
    85    shadowTestRuntimeClasspath project(path: ":sdks:java:core", configuration: "shadowTest")
    86    testImplementation project(path: ":sdks:java:fn-execution", configuration: "testRuntimeMigration")
    87    shadowTestRuntimeClasspath library.java.slf4j_jdk14
    88  }