buildscript {
    ext {
        kotlinVersion = '1.2.20'
        kotlinxCoroutinesVersion = '0.21.2'
        javaVersion = JavaVersion.VERSION_1_7
    }

    repositories {
        jcenter()
        maven { url 'https://maven.google.com' }
        maven { url 'https://jitpack.io' }
        maven { url "https://dl.bintray.com/kotlin/kotlin-dev" }
        maven { url "https://dl.bintray.com/jetbrains/markdown/" }
        maven { url "https://dl.bintray.com/arrow-kt/arrow-kt/" }
        maven { url "https://dl.bintray.com/macroing-org/CEL4J-Artifact/" }
    }
    dependencies {
        classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion"
        classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.8.0'
        classpath 'io.arrow-kt:ank-gradle-plugin:0.7.1'
    }
}

subprojects { project ->

    apply plugin: 'com.jfrog.bintray'
    bintray {
        user = project.hasProperty('bintrayUser') ? project.property('bintrayUser') : System.getenv('BINTRAY_USER')
        key = project.hasProperty('bintrayApiKey') ? project.property('bintrayApiKey') : System.getenv('BINTRAY_API_KEY')
        configurations = ['archives']
        pkg {
            repo = 'arrow-kt'
            name = POM_ARTIFACT_ID
            userOrg = POM_DEVELOPER_ID
            licenses = ['Apache-2.0']
            vcsUrl = 'https://github.com/arrow-kt/ank.git'
        }
    }
}

allprojects {

    ext {
        ankGroup = 'io.arrow-kt'
        ankVersion = '0.7.2-SNAPSHOT'
    }

    repositories {
        jcenter()
        maven { url 'https://maven.google.com' }
        maven { url 'https://kotlin.bintray.com/kotlinx' }
        maven { url "https://dl.bintray.com/kotlin/kotlin-dev" }
        maven { url "https://dl.bintray.com/arrow-kt/arrow-kt" }
        maven { url "https://dl.bintray.com/jetbrains/markdown/" }
        maven { url 'https://jitpack.io' }
    }
}
