plugins {
    id 'org.jetbrains.kotlin.jvm' version '1.3.72'
}

repositories {
    mavenCentral()
}

sourceCompatibility = '1.8'

dependencies {
    def flink_version = "1.11.1"
    def scala_version = "2.12"

    implementation 'org.jetbrains.kotlin:kotlin-stdlib-jdk8'
    compileOnly "org.apache.flink:flink-streaming-java_${scala_version}:${flink_version}"
}

task sourcesJar(type: Jar) {
    from sourceSets.main.allSource
    classifier "sources"
}

publishing {
    publications {
        maven(MavenPublication) {
            artifactId = 'flink-kt-tuple-helper'
            artifact(sourcesJar)
            from components.java
        }
    }
}