plugins {
    id 'java'

    id 'application'
    id 'jvm-test-suite'
}

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

application {
    mainClass = 'nu.marginalia.converting.ConverterMain'
    applicationName = 'converter-process'
}

tasks.distZip.enabled = false

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

dependencies {

    implementation project(':third-party:porterstemmer')
    implementation project(':third-party:count-min-sketch')
    implementation project(':third-party:parquet-floor')

    implementation project(':code:index:api')
    implementation project(':code:processes:process-mq-api')

    implementation project(':code:common:model')
    implementation project(':code:common:db')
    implementation project(':code:common:service')
    implementation project(':code:common:config')
    implementation project(':code:libraries:message-queue')
    implementation project(':code:libraries:blocking-thread-pool')

    implementation project(':code:libraries:guarded-regex')
    implementation project(':code:libraries:easy-lsh')
    implementation project(':code:libraries:coded-sequence')
    implementation project(':code:libraries:geo-ip')
    implementation project(':code:libraries:language-processing')

    implementation project(':code:processes:converting-process:model')
    implementation project(':code:processes:crawling-process:model')

    implementation project(':code:processes:converting-process:ft-anchor-keywords')
    implementation project(':code:processes:converting-process:ft-keyword-extraction')

    implementation project(':code:processes:crawling-process:ft-crawl-blocklist')
    implementation project(':code:processes:crawling-process:ft-link-parser')
    implementation project(':code:processes:crawling-process:ft-content-type')

    testImplementation project(':code:libraries:term-frequency-dict')
    testImplementation project(':code:processes:crawling-process:model')

    implementation libs.slop
    implementation libs.bundles.slf4j

    implementation libs.notnull
    implementation libs.jwarc

    implementation libs.jsoup
    implementation libs.pdfbox

    implementation libs.guava
    implementation dependencies.create(libs.guice.get()) {
        exclude group: 'com.google.guava'
    }
    implementation libs.guava
    implementation libs.bundles.gson

    implementation libs.zstd

    implementation libs.bundles.mariadb
    implementation libs.bundles.nlp

    implementation libs.roaringbitmap
    implementation libs.trove
    implementation libs.fastutil

    implementation libs.snakeyaml

    implementation libs.crawlercommons

    implementation libs.commons.lang3
    implementation libs.commons.compress
    implementation libs.sqlite

    implementation libs.bundles.httpcomponents

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

    testImplementation platform('org.testcontainers:testcontainers-bom:1.17.4')
    testImplementation libs.commons.codec
    testImplementation 'org.testcontainers:mariadb:1.17.4'
    testImplementation 'org.testcontainers:junit-jupiter:1.17.4'
    testImplementation project(':code:libraries:test-helpers')
    testImplementation project(':third-party:encyclopedia-marginalia-nu')
    testImplementation project(':code:processes:test-data')
    testImplementation project(':code:processes:crawling-process')


}
