
plugins {
    id "org.jetbrains.kotlin.jvm" version "1.3.72"
}

apply(from: "$gradleScripts/kotlin.gradle")
apply(from: "$gradleScripts/application.gradle")

apply(plugin: "war")

defaultTasks("installDist")

application {
    mainClassName = "com.hexagonkt.BenchmarkKt"
}

war {
    archiveFileName = "ROOT.war"
}

installDist.dependsOn("war")

dependencies {
    implementation("com.hexagonkt:store_mongodb:$hexagonVersion")
    implementation("com.hexagonkt:http_server_jetty:$hexagonVersion")
    implementation("com.hexagonkt:templates_pebble:$hexagonVersion")

    implementation("com.zaxxer:HikariCP:$hikariVersion")
    implementation("org.postgresql:postgresql:$postgresqlVersion")

    implementation("org.slf4j:slf4j-jdk14:1.7.30")
    runtimeOnly("org.slf4j:jcl-over-slf4j:1.7.30")
    runtimeOnly("org.slf4j:log4j-over-slf4j:1.7.30")

    // providedCompile excludes the dependency only in the WAR, not in the distribution
    providedCompile("org.eclipse.jetty:jetty-webapp:$jettyVersion") { exclude module: "slf4j-api" }

    testImplementation("com.hexagonkt:http_client_ahc:$hexagonVersion")
}
