forked from apache/beam
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
165 lines (151 loc) · 6.7 KB
/
build.gradle
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
/*
* 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.gcp',
enableSpotbugs: false,
)
description = "Apache Beam :: SDKs :: Java :: IO :: Google Cloud Platform"
ext.summary = "IO library to read and write Google Cloud Platform systems from Beam."
dependencies {
compile enforcedPlatform(library.java.google_cloud_platform_libraries_bom)
compile project(path: ":sdks:java:core", configuration: "shadow")
compile project(":sdks:java:expansion-service")
compile project(":sdks:java:extensions:google-cloud-platform-core")
compile project(":sdks:java:extensions:protobuf")
compile library.java.avro
compile library.java.bigdataoss_util
compile library.java.gax
compile library.java.gax_grpc
compile library.java.google_api_client
compile library.java.google_api_services_bigquery
compile library.java.google_api_services_healthcare
compile library.java.google_api_services_pubsub
compile library.java.google_auth_library_credentials
compile library.java.google_auth_library_oauth2_http
compile library.java.google_cloud_bigquery_storage
compile(library.java.google_cloud_bigtable_client_core) {
exclude group: 'io.grpc', module: 'grpc-core' // Use Beam's version
exclude group: 'io.grpc', module: 'grpc-grpclb'
}
compile library.java.google_cloud_core
compile(library.java.google_cloud_core_grpc) {
exclude group: 'io.grpc', module: 'grpc-core' // Use Beam's version
}
compile library.java.google_cloud_datastore_v1_proto_client
compile library.java.google_cloud_pubsublite
// GCP PubSub client is used in TestPubSub
compile library.java.google_cloud_pubsub
compile library.java.google_cloud_spanner
compile library.java.google_http_client
compile library.java.google_http_client_jackson2
compile library.java.grpc_alts
compile library.java.grpc_api
compile library.java.grpc_auth
compile library.java.grpc_core
compile library.java.grpc_context
compile library.java.grpc_grpclb
compile library.java.grpc_netty
compile library.java.grpc_netty_shaded
compile library.java.grpc_stub
compile library.java.grpc_google_cloud_pubsub_v1
compile library.java.grpc_google_cloud_pubsublite_v1
compile library.java.guava
compile library.java.hamcrest_core
compile library.java.jackson_databind
compile library.java.joda_time
compile library.java.junit
compile library.java.netty_handler
compile library.java.netty_tcnative_boringssl_static
compile library.java.proto_google_cloud_bigquerybeta2_storage_v1
compile library.java.proto_google_cloud_bigtable_v2
compile library.java.proto_google_cloud_datastore_v1
compile library.java.proto_google_cloud_pubsub_v1
compile library.java.proto_google_cloud_pubsublite_v1
compile library.java.proto_google_cloud_spanner_admin_database_v1
compile library.java.proto_google_common_protos
compile library.java.protobuf_java
compile library.java.slf4j_api
testCompile project(path: ":sdks:java:core", configuration: "shadowTest")
testCompile project(path: ":sdks:java:extensions:google-cloud-platform-core", configuration: "testRuntime")
testCompile project(path: ":runners:direct-java", configuration: "shadow")
testCompile project(path: ":sdks:java:io:common", configuration: "testRuntime")
testCompile project(path: ":sdks:java:testing:test-utils", configuration: "testRuntime")
// For testing Cross-language transforms
testCompile project(":runners:core-construction-java")
testCompile library.java.hamcrest_library
testCompile library.java.mockito_core
testCompile library.java.powermock
testCompile library.java.powermock_mockito
testRuntimeOnly library.java.slf4j_jdk14
}
/**
* These are integration tests with the real Pubsub service and the DirectRunner.
*/
task integrationTest(type: Test, dependsOn: processTestResources) {
group = "Verification"
def gcpProject = project.findProperty('gcpProject') ?: 'apache-beam-testing'
def gcpTempRoot = project.findProperty('gcpTempRoot') ?: 'gs://temp-storage-for-end-to-end-tests'
systemProperty "beamTestPipelineOptions", JsonOutput.toJson([
"--runner=DirectRunner",
"--project=${gcpProject}",
"--tempRoot=${gcpTempRoot}",
])
// Disable Gradle cache: these ITs interact with live service that should always be considered "out of date"
outputs.upToDateWhen { false }
include '**/*IT.class'
exclude '**/BigQueryIOReadIT.class'
exclude '**/BigQueryIOStorageQueryIT.class'
exclude '**/BigQueryIOStorageReadIT.class'
exclude '**/BigQueryIOStorageReadTableRowIT.class'
exclude '**/BigQueryToTableIT.class'
maxParallelForks 4
classpath = sourceSets.test.runtimeClasspath
testClassesDirs = sourceSets.test.output.classesDirs
useJUnit {
excludeCategories "org.apache.beam.sdk.testing.UsesKms"
}
}
task integrationTestKms(type: Test) {
group = "Verification"
def gcpProject = project.findProperty('gcpProject') ?: 'apache-beam-testing'
def gcpTempRoot = project.findProperty('gcpTempRootKms') ?: 'gs://temp-storage-for-end-to-end-tests-cmek'
def dataflowKmsKey = project.findProperty('dataflowKmsKey') ?: "projects/apache-beam-testing/locations/global/keyRings/beam-it/cryptoKeys/test"
systemProperty "beamTestPipelineOptions", JsonOutput.toJson([
"--runner=DirectRunner",
"--project=${gcpProject}",
"--tempRoot=${gcpTempRoot}",
"--dataflowKmsKey=${dataflowKmsKey}",
])
// Disable Gradle cache: these ITs interact with live service that should always be considered "out of date"
outputs.upToDateWhen { false }
include '**/*IT.class'
maxParallelForks 4
classpath = sourceSets.test.runtimeClasspath
testClassesDirs = sourceSets.test.output.classesDirs
useJUnit {
includeCategories "org.apache.beam.sdk.testing.UsesKms"
}
}
task postCommit {
group = "Verification"
description = "Integration tests of GCP connectors using the DirectRunner."
dependsOn integrationTest
dependsOn integrationTestKms
}