blob: b95f987e998774206fd5e127c04d9d550edb7204 [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
plugins { id 'org.apache.beam.module' }
applyJavaNature()
description = "Apache Beam :: Runners :: Gearpump"
/*
* 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")
def gearpump_version = "0.9.0"
configurations {
validatesRunner
}
dependencies {
shadow library.java.vendored_guava_20_0
compileOnly "com.typesafe:config:1.3.0"
compileOnly "org.scala-lang:scala-library:2.12.7"
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 "io.github.gearpump:gearpump-core_2.12:$gearpump_version:assembly"
shadow "io.github.gearpump:gearpump-streaming_2.12:$gearpump_version:assembly"
shadow library.java.joda_time
shadow library.java.jackson_annotations
shadowTest project(path: ":beam-sdks-java-core", configuration: "shadowTest")
shadowTest library.java.junit
shadowTest library.java.hamcrest_core
shadowTest library.java.hamcrest_library
shadowTest library.java.jackson_databind
shadowTest library.java.jackson_dataformat_yaml
shadowTest library.java.mockito_core
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 validatesRunnerStreaming(type: Test) {
group = "Verification"
systemProperty "beamTestPipelineOptions", JsonOutput.toJson([
"--runner=TestGearpumpRunner",
"--streaming=true",
])
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.FlattenWithHeterogeneousCoders'
excludeCategories 'org.apache.beam.sdk.testing.UsesSchema'
excludeCategories 'org.apache.beam.sdk.testing.UsesStatefulParDo'
excludeCategories 'org.apache.beam.sdk.testing.UsesTimersInParDo'
excludeCategories 'org.apache.beam.sdk.testing.UsesUnboundedSplittableParDo'
excludeCategories 'org.apache.beam.sdk.testing.UsesSplittableParDoWithWindowedSideInputs'
excludeCategories 'org.apache.beam.sdk.testing.UsesAttemptedMetrics'
excludeCategories 'org.apache.beam.sdk.testing.UsesCommittedMetrics'
excludeCategories 'org.apache.beam.sdk.testing.UsesTestStream'
excludeCategories 'org.apache.beam.sdk.testing.UsesCustomWindowMerging'
excludeCategories 'org.apache.beam.sdk.testing.UsesParDoLifecycle'
excludeCategories 'org.apache.beam.sdk.testing.UsesImpulse'
excludeCategories 'org.apache.beam.sdk.testing.UsesMetricsPusher'
}
}
task validatesRunner {
group = "Verification"
description "Validates Gearpump runner"
dependsOn validatesRunnerStreaming
}
createJavaExamplesArchetypeValidationTask(type: 'Quickstart', runner: 'Gearpump')