Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
build.gradle for Kotlin Apache Beam
buildscript {
ext.kotlin_version = '1.3.41'
ext.beam_version = '2.19.0'
repositories {
mavenCentral()
}
dependencies {
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
}
plugins {
id "java"
id "application"
id "org.jetbrains.kotlin.jvm" version "1.3.41"
}
sourceCompatibility = "1.8"
application {
def className = project.hasProperty("mainClass") ? getProperty("mainClass") : "MyPipeline"
mainClassName = "com.example.${className}"
}
repositories {
mavenCentral()
}
dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
implementation "org.jetbrains.kotlin:kotlin-test-junit:$kotlin_version"
implementation "org.slf4j:slf4j-simple:1.7.26"
implementation "org.apache.beam:beam-sdks-java-core:$beam_version"
implementation "org.apache.beam:beam-sdks-java-extensions-sorter:$beam_version"
implementation "org.apache.beam:beam-runners-direct-java:$beam_version"
implementation "org.apache.beam:beam-runners-google-cloud-dataflow-java:$beam_version"
testCompile "junit:junit:4.11"
}
run {
if (project.hasProperty("args")) {
args project.args.split("\\s")
}
}
@mikesorae
Copy link
Author

mikesorae commented Apr 7, 2020

gradle run -Pargs="--runner=DirectRunner --paramName=fooBar"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment