buildscript {
    ext.appengine_version = '1.9.60'
    ext.appengine_plugin_version = '1.3.4'

    repositories {
        jcenter()
    }
    dependencies {
        classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
        classpath "com.google.cloud.tools:appengine-gradle-plugin:$appengine_plugin_version"
    }
}

apply plugin: 'kotlin'
apply plugin: 'war'
apply plugin: 'com.google.cloud.tools.appengine'
apply plugin: 'kotlinx-serialization'

//appengine.tools.cloudSdkHome="/Users/dmitri/Documents/appengine/google-cloud-sdk"
appengine.tools.cloudSdkHome="C:/Program Files (x86)/Google/Cloud SDK/google-cloud-sdk"

sourceSets {
    main.kotlin.srcDirs = [ 'src/main/kotlin' ]
}

repositories {
    jcenter()
    maven { url "https://dl.bintray.com/kotlin/ktor" }
    maven { url "https://dl.bintray.com/kotlin/kotlinx" }
}

dependencies {
    compile "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version"
    compile "io.ktor:ktor-server-servlet:$ktor_version"
    compile "io.ktor:ktor-html-builder:$ktor_version"
    compile "io.ktor:ktor-websockets:$ktor_version"
    compile "io.ktor:ktor-gson:$ktor_version"
    compile "com.google.cloud:google-cloud-logging-logback:$gce_logback_version"
    compile "com.google.appengine:appengine-api-1.0-sdk:$appengine_version"
    compile "io.ktor:ktor-client-apache:$ktor_version"
    compile "io.ktor:ktor-server-netty:$ktor_version"
    compile "io.ktor:ktor-jackson:$ktor_version"
    implementation ("org.jetbrains.kotlinx:kotlinx-serialization-runtime:0.13.0")
    implementation ("io.ktor:ktor-client-serialization-jvm:1.2.4")
    implementation ("io.ktor:ktor-client-core-jvm:1.2.4")
    implementation ("io.ktor:ktor-client-json-jvm:1.2.4")
   providedCompile "com.google.appengine:appengine:$appengine_version"

    implementation "com.h2database:h2:$h2_version"
    implementation "org.jetbrains.exposed:exposed:$exposed_version"
    implementation 'com.zaxxer:HikariCP:3.4.1'
}

task run(dependsOn: appengineRun)
