plugins {
    id 'java'
    id 'jvm-test-suite'
    id 'gg.jte.gradle' version '3.1.15'
}

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

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

dependencies {
    implementation project(':code:common:config')
    implementation libs.bundles.slf4j
    implementation project(':third-party:rdrpostagger')
    implementation project(':third-party:porterstemmer')
    implementation project(':third-party:commons-codec')
    implementation project(':third-party:openzim')
    implementation project(':code:common:model')
    implementation project(':code:common:service')
    implementation project(':code:libraries:easy-lsh')
    implementation project(':code:libraries:coded-sequence')
    implementation libs.notnull
    implementation libs.bundles.jooby

    implementation libs.guava
    implementation dependencies.create(libs.guice.get()) {
        exclude group: 'com.google.guava'
    }
    implementation libs.jsoup
    implementation libs.trove
    implementation libs.fastutil

    implementation libs.bundles.nlp
    implementation libs.commons.lang3

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

jte {
    sourceDirectory = file('resources/ltt/jte').toPath()
    targetDirectory = file('build/classes/jte-precompiled').toPath()
    generate()
}