github.com/apache/beam/sdks/v2@v2.48.2/java/container/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 {
    20    id 'org.apache.beam.module'
    21    id 'com.github.jk1.dependency-license-report' version '1.16'
    22  }
    23  
    24  applyGoNature()
    25  applyPythonNature()
    26  
    27  evaluationDependsOn(":sdks:java:harness")
    28  evaluationDependsOn(":sdks:java:io:jdbc")
    29  
    30  description = "Apache Beam :: SDKs :: Java :: Container"
    31  
    32  configurations {
    33    dockerDependency
    34    sdkHarnessLauncher
    35  }
    36  
    37  dependencies {
    38    dockerDependency library.java.slf4j_api
    39    dockerDependency library.java.slf4j_jdk14
    40    dockerDependency library.java.jcl_over_slf4j
    41    dockerDependency library.java.log4j_over_slf4j
    42    dockerDependency library.java.log4j2_to_slf4j
    43    dockerDependency project(path: ":sdks:java:harness", configuration: "shadow")
    44    dockerDependency library.java.jamm
    45  }
    46  
    47  goBuild {
    48    goTargets = '*.go' // only build the immediate directory.
    49    outputLocation = './build/target/${GOOS}_${GOARCH}/boot'
    50  }
    51  
    52  // command: ./gradlew generateLicenseReport
    53  import com.github.jk1.license.render.*
    54  licenseReport {
    55    projects = [project,
    56                project.rootProject.findProject(':sdks:java:harness')]
    57    excludeOwnGroup = true
    58    excludeGroups = ["beam.*"] // project dependencies do not match their maven coords
    59    configurations = ALL
    60    renderers = [new JsonReportRenderer()]
    61  }
    62  
    63  task pullLicenses(type: Exec) {
    64    dependsOn generateLicenseReport
    65    generateLicenseReport.outputs.cacheIf { false }
    66  
    67    commandLine './license_scripts/license_script.sh', "python${project.ext.pythonVersion}"
    68    outputs.dir('build/target/third_party_licenses')
    69    outputs.dir('build/target/java_third_party_licenses')
    70  }
    71  
    72  task downloadCloudProfilerAgent(type: Exec) {
    73    executable "sh"
    74    args "-c", "curl https://storage.googleapis.com/cloud-profiler/java/latest/profiler_java_agent.tar.gz | tar xzv -C build/target/profiler/"
    75    outputs.dir('build/target/profiler')
    76  }
    77  
    78  artifacts {
    79    sdkHarnessLauncher file: file('./build/target'), builtBy: goBuild
    80  }
    81  
    82  task pushAll {
    83    dependsOn ":sdks:java:container:java8:dockerPush"
    84    dependsOn ":sdks:java:container:java11:dockerPush"
    85    dependsOn ":sdks:java:container:java17:dockerPush"
    86  }