Created
April 7, 2020 23:36
-
-
Save mikesorae/50aefd427069fa43886aab65d491ff98 to your computer and use it in GitHub Desktop.
build.gradle for Kotlin Apache Beam
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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") | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
gradle run -Pargs="--runner=DirectRunner --paramName=fooBar"