blob: 3f9147afbeab077f03d5b856e849b95529cac60c [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.
*/
import groovy.json.JsonOutput
apply plugin: org.apache.beam.gradle.BeamModulePlugin
applyJavaNature()
description = "Apache Beam :: Runners :: Samza"
/*
* 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.
*/
evaluationDependsOn(":beam-sdks-java-core")
configurations {
validatesRunner
}
def samza_version = "0.14.1"
dependencies {
compile library.java.guava
shadow project(path: ":beam-sdks-java-core", configuration: "shadow")
shadow project(path: ":beam-runners-core-java", configuration: "shadow")
shadow project(path: ":beam-runners-core-construction-java", configuration: "shadow")
shadow project(path: ":beam-runners-java-fn-execution", configuration: "shadow")
shadow library.java.jackson_annotations
shadow library.java.slf4j_api
shadow library.java.joda_time
shadow library.java.commons_compress
shadow library.java.commons_io_2x
shadow library.java.args4j
shadow "org.apache.samza:samza-api:$samza_version"
shadow "org.apache.samza:samza-core_2.11:$samza_version"
shadow "org.apache.samza:samza-kafka_2.11:$samza_version"
shadow "org.apache.samza:samza-kv_2.11:$samza_version"
shadow "org.apache.samza:samza-kv-rocksdb_2.11:$samza_version"
shadow "org.apache.samza:samza-kv-inmemory_2.11:$samza_version"
shadow "org.apache.kafka:kafka-clients:0.11.0.2"
shadowTest project(path: ":beam-sdks-java-core", configuration: "shadowTest")
shadowTest project(path: ":beam-runners-core-java", configuration: "shadowTest")
shadowTest library.java.commons_lang3
shadowTest library.java.hamcrest_core
shadowTest library.java.junit
shadowTest library.java.mockito_core
shadowTest library.java.jackson_dataformat_yaml
validatesRunner project(path: ":beam-sdks-java-core", configuration: "shadowTest")
validatesRunner project(path: ":beam-runners-core-java", configuration: "shadowTest")
validatesRunner project(path: project.path, configuration: "shadow")
}
task validatesRunner(type: Test) {
group = "Verification"
description "Validates Samza runner"
systemProperty "beamTestPipelineOptions", JsonOutput.toJson([
"--runner=TestSamzaRunner",
])
classpath = configurations.validatesRunner
testClassesDirs = files(project(":beam-sdks-java-core").sourceSets.test.output.classesDirs)
useJUnit {
includeCategories 'org.apache.beam.sdk.testing.ValidatesRunner'
excludeCategories 'org.apache.beam.sdk.testing.LargeKeys$Above100MB'
excludeCategories 'org.apache.beam.sdk.testing.UsesAttemptedMetrics'
excludeCategories 'org.apache.beam.sdk.testing.UsesCommittedMetrics'
excludeCategories 'org.apache.beam.sdk.testing.UsesImpulse'
excludeCategories 'org.apache.beam.sdk.testing.UsesUnboundedSplittableParDo'
excludeCategories 'org.apache.beam.sdk.testing.UsesTestStream'
excludeCategories 'org.apache.beam.sdk.testing.UsesTimersInParDo'
excludeCategories 'org.apache.beam.sdk.testing.UsesMetricsPusher'
excludeCategories 'org.apache.beam.sdk.testing.UsesParDoLifecycle'
}
}
// Generates :beam-runners-samza:runQuickstartJavaSamza
createJavaExamplesArchetypeValidationTask(type: 'Quickstart', runner:'Samza')