buildscript {
    /*
    we dont use them here, but need to load urlfetch imports so that the project builds
     */
    ext.appengine_version = '1.9.60'
    ext.appengine_plugin_version = '1.3.4'
    repositories {
        jcenter()
    }
    dependencies {
        classpath 'com.github.jengelman.gradle.plugins:shadow:5.1.0'
        classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
    }
}

apply plugin: 'com.github.johnrengelman.shadow'
apply plugin: 'kotlin'
apply plugin: 'application'
apply plugin: 'kotlinx-serialization'


mainClassName = 'io.ktor.server.netty.EngineMain'


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

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

dependencies {

    implementation "org.jetbrains.kotlin:kotlin-reflect:$kotlin_version"

    implementation "io.ktor:ktor-jackson:$ktor_version"


    implementation "ch.qos.logback:logback-classic:1.2.3"

    implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version"
    implementation "io.ktor:ktor-server-servlet:$ktor_version"
    implementation "io.ktor:ktor-html-builder:$ktor_version"
    implementation "io.ktor:ktor-websockets:$ktor_version"
    implementation "io.ktor:ktor-gson:$ktor_version"
    implementation "com.google.cloud:google-cloud-logging-logback:$gce_logback_version"
    implementation "io.ktor:ktor-client-apache:$ktor_version"
    implementation "io.ktor:ktor-server-netty:$ktor_version"
    implementation "com.google.appengine:appengine-api-1.0-sdk:$appengine_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")


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

}

// This task will generate your fat JAR and put it in the ./build/libs/ directory
shadowJar {
    manifest {
        attributes 'Main-Class': mainClassName
    }
}