plugins {
    id 'java'
    id 'org.jetbrains.kotlin.multiplatform'
    id 'java-library'
}

repositories {
    mavenCentral()
}

kotlin {

    jvm()
    js()

    sourceSets {

        commonMain {
            dependencies {
                api project(":kotlintest-assertions")
                api kotlin("stdlib-common")
                api 'org.jetbrains.kotlinx:kotlinx-coroutines-core-common:1.3.0-RC2'
            }
        }

        jsMain {
            dependsOn commonMain
            dependencies {
                api kotlin('stdlib-js')
                api kotlin("test-js")
                api 'org.jetbrains.kotlinx:kotlinx-coroutines-core-js:1.3.0-RC2'
            }
        }

        jvmMain {
            dependsOn commonMain
            dependencies {
                api kotlin('stdlib-jdk8')
                implementation 'io.ktor:ktor-client-cio:1.2.3'
                implementation kotlin("reflect")
                api 'org.jetbrains.kotlinx:kotlinx-coroutines-core:1.3.0-RC2'
                api 'org.slf4j:slf4j-api:1.7.25'
                implementation group: 'org.junit.jupiter', name: 'junit-jupiter-api', version: '5.5.1'
                implementation "io.arrow-kt:arrow-core-data:$arrow_version"
            }
        }
    }
}

compileKotlinJs.configure {
    kotlinOptions {
        moduleKind = 'commonjs'
    }
}

compileKotlinJvm {
    kotlinOptions {
        freeCompilerArgs += '-Xuse-experimental=kotlin.Experimental'
    }
}

sourceCompatibility = 1.6
targetCompatibility = 1.6

apply from: '../publish.gradle'
