plugins {
    id 'java'

    id 'application'
    id 'jvm-test-suite'
    id 'com.google.cloud.tools.jib' version '3.4.5'
}

application {
    mainClass = 'nu.marginalia.assistant.AssistantMain'
    applicationName = 'assistant-service'
}

tasks.distZip.enabled = false

java {
    toolchain {
        languageVersion.set(JavaLanguageVersion.of(rootProject.ext.jvmVersion))
    }
}

apply from: "$rootProject.projectDir/srcsets.gradle"
apply from: "$rootProject.projectDir/docker.gradle"

dependencies {


    implementation project(':code:common:db')
    implementation project(':code:common:model')
    implementation project(':code:common:service')
    implementation project(':code:common:config')

    implementation project(':code:functions:live-capture')
    implementation project(':code:functions:live-capture:api')
    implementation project(':code:functions:math')
    implementation project(':code:functions:math:api')
    implementation project(':code:functions:domain-info')
    implementation project(':code:functions:domain-info:api')

    implementation project(':code:libraries:geo-ip')
    implementation project(':code:libraries:language-processing')
    implementation project(':code:libraries:term-frequency-dict')

    implementation project(':third-party:symspell')


    implementation libs.bundles.slf4j
    implementation libs.prometheus
    implementation libs.commons.io
    implementation libs.guava
    libs.bundles.grpc.get().each {
        implementation dependencies.create(it) {
            exclude group: 'com.google.guava'
        }
    }


    implementation libs.notnull
    implementation libs.guava
    implementation dependencies.create(libs.guice.get()) {
        exclude group: 'com.google.guava'
    }
    implementation libs.bundles.jooby
    implementation libs.bundles.jetty
    implementation libs.opencsv
    implementation libs.trove
    implementation libs.fastutil
    implementation libs.bundles.gson
    implementation libs.bundles.mariadb

    testImplementation libs.bundles.slf4j.test
    testImplementation libs.bundles.junit
    testImplementation libs.mockito


}
