| /* |
| * 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. |
| */ |
| import groovy.json.JsonOutput |
| |
| plugins { id 'org.apache.beam.module' } |
| applyJavaNature( |
| automaticModuleName: 'org.apache.beam.sdk.io.debezium', |
| mavenRepositories: [ |
| [id: 'io.confluent', url: 'https://packages.confluent.io/maven/'] |
| ], |
| enableSpotbugs: false, |
| ) |
| provideIntegrationTestingDependencies() |
| |
| description = "Apache Beam :: SDKs :: Java :: IO :: Debezium" |
| ext.summary = "Library to work with Debezium data." |
| |
| dependencies { |
| implementation library.java.vendored_guava_32_1_2_jre |
| implementation library.java.vendored_grpc_1_60_1 |
| implementation project(path: ":sdks:java:core", configuration: "shadow") |
| implementation library.java.slf4j_api |
| implementation library.java.joda_time |
| provided library.java.jackson_dataformat_csv |
| permitUnusedDeclared library.java.jackson_dataformat_csv |
| testImplementation project(path: ":sdks:java:core", configuration: "shadowTest") |
| testImplementation project(path: ":sdks:java:io:common", configuration: "testRuntimeMigration") |
| |
| // Test dependencies |
| testImplementation library.java.junit |
| testImplementation project(path: ":sdks:java:io:jdbc") |
| testRuntimeOnly library.java.slf4j_jdk14 |
| testRuntimeOnly project(path: ":runners:direct-java", configuration: "shadow") |
| testImplementation project(":runners:google-cloud-dataflow-java") |
| testImplementation library.java.hamcrest |
| testImplementation library.java.testcontainers_base |
| testImplementation library.java.testcontainers_mysql |
| testImplementation library.java.testcontainers_postgresql |
| |
| // Kafka connect dependencies |
| implementation "org.apache.kafka:connect-api:2.5.0" |
| implementation "org.apache.kafka:connect-json:2.5.0" |
| permitUnusedDeclared "org.apache.kafka:connect-json:2.5.0" // BEAM-11761 |
| |
| // Debezium dependencies |
| implementation group: 'io.debezium', name: 'debezium-core', version: '1.3.1.Final' |
| testImplementation group: 'io.debezium', name: 'debezium-connector-mysql', version: '1.3.1.Final' |
| testImplementation group: 'io.debezium', name: 'debezium-connector-postgres', version: '1.3.1.Final' |
| } |
| |
| test { |
| testLogging { |
| outputs.upToDateWhen {false} |
| showStandardStreams = true |
| } |
| } |
| |
| |
| task integrationTest(type: Test, dependsOn: processTestResources) { |
| group = "Verification" |
| systemProperty "beamTestPipelineOptions", JsonOutput.toJson([ |
| "--runner=DirectRunner", |
| ]) |
| |
| // Disable Gradle cache: these ITs interact with live service that should always be considered "out of date" |
| outputs.upToDateWhen { false } |
| |
| include '**/*IT.class' |
| classpath = sourceSets.test.runtimeClasspath |
| testClassesDirs = sourceSets.test.output.classesDirs |
| |
| useJUnit { |
| } |
| } |