github.com/apache/beam/sdks/v2@v2.48.2/java/extensions/zetasketch/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 import groovy.json.JsonOutput 20 21 plugins { id 'org.apache.beam.module' } 22 applyJavaNature( 23 automaticModuleName: 'org.apache.beam.sdk.extensions.zetasketch') 24 25 description = "Apache Beam :: SDKs :: Java :: Extensions :: ZetaSketch" 26 27 evaluationDependsOn(":runners:google-cloud-dataflow-java:worker") 28 29 def zetasketch_version = "0.1.0" 30 31 dependencies { 32 implementation enforcedPlatform(library.java.google_cloud_platform_libraries_bom) 33 34 implementation library.java.auto_value_annotations 35 implementation library.java.slf4j_api 36 implementation library.java.vendored_guava_26_0_jre 37 implementation project(path: ":sdks:java:core", configuration: "shadow") 38 implementation "com.google.zetasketch:zetasketch:$zetasketch_version" 39 testImplementation library.java.junit 40 testImplementation library.java.hamcrest 41 testImplementation project(":sdks:java:io:google-cloud-platform") 42 testImplementation project(":sdks:java:extensions:google-cloud-platform-core") 43 testImplementation library.java.google_api_services_bigquery 44 testImplementation library.java.proto_google_cloud_bigquery_storage_v1 45 testRuntimeOnly library.java.slf4j_simple 46 testRuntimeOnly project(path: ":runners:direct-java", configuration: "shadow") 47 testRuntimeOnly project(":runners:google-cloud-dataflow-java") 48 } 49 50 /** 51 * Integration tests running on Dataflow with BigQuery. 52 */ 53 task integrationTest(type: Test) { 54 group = "Verification" 55 56 dependsOn ":runners:google-cloud-dataflow-java:worker:shadowJar" 57 def dataflowWorkerJar = project.findProperty('dataflowWorkerJar') ?: project(":runners:google-cloud-dataflow-java:worker").shadowJar.archivePath 58 59 def gcpProject = project.findProperty('gcpProject') ?: 'apache-beam-testing' 60 def gcpRegion = project.findProperty('gcpRegion') ?: 'us-central1' 61 def gcpTempRoot = project.findProperty('gcpTempRoot') ?: 'gs://temp-storage-for-end-to-end-tests' 62 63 // Set workerHarnessContainerImage to empty to make Dataflow pick up the non-versioned container 64 // image, which handles a staged worker jar. 65 systemProperty "beamTestPipelineOptions", JsonOutput.toJson([ 66 "--runner=TestDataflowRunner", 67 "--project=${gcpProject}", 68 "--region=${gcpRegion}", 69 "--tempRoot=${gcpTempRoot}", 70 "--dataflowWorkerJar=${dataflowWorkerJar}", 71 "--workerHarnessContainerImage=", 72 ]) 73 74 // Disable Gradle cache: these ITs interact with live service that should always be considered "out of date" 75 outputs.upToDateWhen { false } 76 77 include '**/*IT.class' 78 maxParallelForks 4 79 classpath = sourceSets.test.runtimeClasspath 80 testClassesDirs = sourceSets.test.output.classesDirs 81 } 82 83 task postCommit { 84 group = "Verification" 85 description = "Integration tests of sketch compatibility between Dataflow and BigQuery." 86 dependsOn integrationTest 87 }