plugins {
    alias(libs.plugins.kotlin.jvm)
    alias(libs.plugins.kotlin.serialization)
    alias(libs.plugins.detekt)
}

group = "com.marvinelsen"
version = "2.0.0"

repositories {
    mavenCentral()
    maven {
        url = uri("https://gitea.marvinelsen.com/api/packages/marvinelsen/maven")
    }
}

dependencies {
    detektPlugins(libs.detekt.formatting)

    implementation(libs.chinese.transliteration)
    implementation(libs.cedict.parser)
    implementation(libs.moedict.parser)
    implementation(libs.cross.straits.parser)

    implementation(libs.opencc)

    implementation(libs.sqlite.jdbc)

    implementation(libs.kotlinx.serialization.json)

    testImplementation(libs.kotest.core)
    testImplementation(libs.kotest.assertions)
}

tasks.test {
    useJUnitPlatform()
}

kotlin {
    jvmToolchain(21)
}

detekt {
    buildUponDefaultConfig = true
    allRules = false
    autoCorrect = true
}
