blob: b0e2a89be4806a47c4de0e96fa264f875ead921f [file] [log] [blame]
/*
* 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.
*/
apply from: project(":").file("build_rules.gradle")
applyJavaNature(enableFindbugs: false /* BEAM-925 */)
description = "Apache Beam :: Runners :: Google Cloud Dataflow"
/*
* We need to rely on manually specifying these evaluationDependsOn to ensure that
* the following projects are evaluated before we evaluate this project. This is because
* we are attempting to reference the "sourceSets.test.output" directly.
* TODO: Swap to generating test artifacts which we can then rely on instead of
* the test outputs directly.
*/
evaluationDependsOn(":sdks:java:io:google-cloud-platform")
evaluationDependsOn(":sdks:java:extensions:google-cloud-platform-core")
evaluationDependsOn(":model:fn-execution")
processResources {
filter org.apache.tools.ant.filters.ReplaceTokens, tokens: [
'dataflow.legacy_environment_major_version' : '7',
'dataflow.fnapi_environment_major_version' : '1',
'dataflow.container_version' : 'beam-master-20180122'
]
}
// Exclude tests that need a runner
test {
systemProperty "beamTestPipelineOptions", ""
systemProperty "beamUseDummyRunner", "true"
}
dependencies {
compile library.java.guava
shadow project(path: ":model:pipeline", configuration: "shadow")
shadow project(path: ":sdks:java:core", configuration: "shadow")
shadow project(path: ":sdks:java:extensions:google-cloud-platform-core", configuration: "shadow")
shadow project(path: ":sdks:java:io:google-cloud-platform", configuration: "shadow")
shadow project(path: ":runners:core-construction-java", configuration: "shadow")
shadow library.java.google_api_client
shadow library.java.google_http_client
shadow library.java.google_http_client_jackson2
shadow library.java.google_api_services_dataflow
shadow library.java.google_api_services_clouddebugger
shadow library.java.google_api_services_storage
shadow library.java.google_auth_library_credentials
shadow library.java.google_auth_library_oauth2_http
shadow library.java.bigdataoss_util
shadow library.java.avro
shadow library.java.joda_time
shadow library.java.findbugs_jsr305
shadow library.java.jackson_core
shadow library.java.jackson_annotations
shadow library.java.jackson_databind
shadow library.java.slf4j_api
testCompile library.java.hamcrest_core
testCompile library.java.junit
testCompile project(":sdks:java:io:google-cloud-platform").sourceSets.test.output
testCompile project(path: ":sdks:java:core", configuration: "shadowTest")
testCompile project(":sdks:java:extensions:google-cloud-platform-core").sourceSets.test.output
testCompile project(":model:fn-execution").sourceSets.test.output
testCompile library.java.guava_testlib
testCompile library.java.slf4j_jdk14
testCompile library.java.mockito_core
testCompile library.java.google_cloud_dataflow_java_proto_library_all
testCompile library.java.datastore_v1_protos
testCompile library.java.jackson_dataformat_yaml
}
test {
systemProperties = [ "beamUseDummyRunner" : "true" ]
}
task packageTests(type: Jar) {
from sourceSets.test.output
classifier = "tests"
}
artifacts.archives packageTests