apply plugin: 'kotlin-platform-jvm'
apply plugin: 'com.github.johnrengelman.shadow'
apply from: "$project.rootDir/gradle/deploy.gradle"
apply plugin: 'org.jetbrains.dokka'

shadowJar {
    version = "$release_version"
    baseName = "cmapi-kotlin-jvm"
    classifier = null
}

dependencies {
    expectedBy project(":")

    // Compile/implementation dependencies
    implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"

    // Test dependencies
    testImplementation "junit:junit:4.12"
    testImplementation "org.jetbrains.kotlin:kotlin-test:$kotlin_version"
    testImplementation "org.jetbrains.kotlin:kotlin-test-junit:$kotlin_version"

    //shadow jar dependencies
    shadow 'junit:junit:3.8.2'
}

dokka {
    outputFormat = 'html'
    outputDirectory = "$buildDir/javadoc"
}

build.dependsOn shadowJar
bintrayUpload.dependsOn shadowJar