github.com/apache/beam/sdks/v2@v2.48.2/java/extensions/ml/build.gradle (about) 1 import groovy.json.JsonOutput 2 3 /* 4 * 5 * * Licensed to the Apache Software Foundation (ASF) under one 6 * * or more contributor license agreements. See the NOTICE file 7 * * distributed with this work for additional information 8 * * regarding copyright ownership. The ASF licenses this file 9 * * to you under the Apache License, Version 2.0 (the 10 * * "License"); you may not use this file except in compliance 11 * * with the License. You may obtain a copy of the License at 12 * * 13 * * http://www.apache.org/licenses/LICENSE-2.0 14 * * 15 * * Unless required by applicable law or agreed to in writing, software 16 * * distributed under the License is distributed on an "AS IS" BASIS, 17 * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 18 * * See the License for the specific language governing permissions and 19 * * limitations under the License. 20 * 21 */ 22 23 plugins { id 'org.apache.beam.module' } 24 applyJavaNature( 25 automaticModuleName: 'org.apache.beam.sdk.extensions.ml' 26 ) 27 28 description = 'Apache Beam :: SDKs :: Java :: Extensions :: ML' 29 30 dependencies { 31 implementation project(path: ":sdks:java:core", configuration: "shadow") 32 implementation project(":sdks:java:expansion-service") 33 permitUnusedDeclared project(":sdks:java:expansion-service") // BEAM-11761 34 implementation library.java.google_http_client 35 implementation 'com.google.cloud:google-cloud-recommendations-ai:0.3.7' 36 implementation 'com.google.cloud:google-cloud-video-intelligence:1.2.0' 37 implementation 'com.google.cloud:google-cloud-dlp:1.1.4' 38 implementation 'com.google.cloud:google-cloud-language:1.99.4' 39 implementation library.java.protobuf_java_util 40 implementation group: 'org.json', name: 'json', version: '20201115' 41 implementation 'com.google.api.grpc:proto-google-cloud-dlp-v2:1.1.4' 42 implementation 'com.google.api.grpc:proto-google-cloud-language-v1:1.81.4' 43 implementation 'com.google.api.grpc:proto-google-cloud-video-intelligence-v1:1.2.0' 44 implementation 'com.google.api.grpc:proto-google-cloud-vision-v1:1.81.3' 45 implementation 'com.google.api.grpc:proto-google-cloud-recommendations-ai-v1beta1:0.3.7' 46 implementation library.java.joda_time 47 implementation library.java.auto_value_annotations 48 implementation library.java.gax 49 implementation library.java.protobuf_java 50 implementation library.java.slf4j_api 51 testImplementation project(path: ':sdks:java:core', configuration: 'shadowTest') 52 implementation 'com.google.cloud:google-cloud-vision:1.99.3' 53 testImplementation library.java.mockito_core 54 testImplementation library.java.google_http_client 55 testImplementation library.java.protobuf_java_util 56 testImplementation group: 'org.json', name: 'json', version: '20201115' 57 testImplementation 'com.google.cloud:google-cloud-recommendations-ai:0.3.7' 58 testImplementation 'com.google.cloud:google-cloud-video-intelligence:1.2.0' 59 testImplementation 'com.google.cloud:google-cloud-dlp:1.1.4' 60 testImplementation project(path: ":sdks:java:extensions:google-cloud-platform-core", configuration: "testRuntimeMigration") 61 testRuntimeOnly project(path: ":runners:direct-java", configuration: "shadow") 62 testRuntimeOnly project(":runners:google-cloud-dataflow-java") 63 } 64 65 /** 66 * These are integration tests with the GCP ML services and the DirectRunner. 67 */ 68 task integrationTest(type: Test) { 69 group = "Verification" 70 def gcpProject = project.findProperty('gcpProject') ?: 'apache-beam-testing' 71 def gcpTempRoot = project.findProperty('gcpTempRoot') ?: 'gs://temp-storage-for-end-to-end-tests' 72 systemProperty "beamTestPipelineOptions", JsonOutput.toJson([ 73 "--runner=DirectRunner", 74 "--project=${gcpProject}", 75 "--tempRoot=${gcpTempRoot}", 76 ]) 77 78 // Disable Gradle cache: these ITs interact with live service that should always be considered "out of date" 79 outputs.upToDateWhen { false } 80 81 include '**/*IT.class' 82 maxParallelForks 4 83 classpath = sourceSets.test.runtimeClasspath 84 testClassesDirs = sourceSets.test.output.classesDirs 85 } 86 87 task postCommit { 88 group = "Verification" 89 description = "Integration tests of ML service connectors using the DirectRunner." 90 dependsOn integrationTest 91 }