github.com/apache/beam/sdks/v2@v2.48.2/java/io/cassandra/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  // Do not relocate guava to avoid issues with Cassandra's version.
    22  applyJavaNature(
    23    automaticModuleName: 'org.apache.beam.sdk.io.cassandra',
    24  )
    25  provideIntegrationTestingDependencies()
    26  enableJavaPerformanceTesting()
    27  
    28  description = "Apache Beam :: SDKs :: Java :: IO :: Cassandra"
    29  ext.summary = "IO to read and write with Apache Cassandra database"
    30  
    31  // compatible with all Cassandra versions up to 3.11.10
    32  def achilles_version = "6.1.0"
    33  
    34  dependencies {
    35    implementation library.java.vendored_guava_26_0_jre
    36    implementation project(path: ":sdks:java:core", configuration: "shadow")
    37    implementation library.java.slf4j_api
    38    implementation library.java.cassandra_driver_core
    39    implementation library.java.cassandra_driver_mapping
    40    testImplementation project(path: ":sdks:java:io:common", configuration: "testRuntimeMigration")
    41    testImplementation library.java.junit
    42    testImplementation library.java.hamcrest
    43    testImplementation library.java.mockito_core
    44  
    45    // for embedded cassandra
    46    testImplementation group: 'info.archinnov', name: 'achilles-junit', version: "$achilles_version"
    47    testImplementation library.java.commons_io
    48    testImplementation library.java.jackson_jaxb_annotations
    49    testRuntimeOnly library.java.slf4j_jdk14
    50    testRuntimeOnly project(path: ":runners:direct-java", configuration: "shadow")
    51  }
    52  
    53  // Cassandra dependencies require old version of Guava (BEAM-11626)
    54  configurations.all (Configuration it) -> {
    55    // error-prone requires newer guava, don't override for annotation processing
    56    // https://github.com/google/error-prone/issues/2745
    57    if (it.name == "annotationProcessor" || it.name =="testAnnotationProcessor") {
    58      return
    59    }
    60    resolutionStrategy {
    61      force 'com.google.guava:guava:25.1-jre'
    62    }
    63  }