plugins {
    id "application"
    id "java-test-fixtures"
    id "me.champeau.jmh" version "0.7.3"
    id "com.diffplug.spotless" version "7.0.2"
}

repositories {
    mavenCentral()
}

java {
    sourceCompatibility = 11
    targetCompatibility = 11
}

dependencies {
    def junitVersion = "5.12.0"
    def jacksonVersion = "2.16.1"

    testImplementation("org.junit.jupiter:junit-jupiter:${junitVersion}")
    testImplementation("org.junit.jupiter:junit-jupiter-params:${junitVersion}")
    testRuntimeOnly("org.junit.platform:junit-platform-launcher")

    testFixturesImplementation("org.apache.tuweni:tuweni-units:2.3.1")
    testFixturesImplementation("com.fasterxml.jackson.core:jackson-databind:${jacksonVersion}")
    testFixturesImplementation("com.fasterxml.jackson.dataformat:jackson-dataformat-yaml:${jacksonVersion}")
}

javadoc {
    options.addStringOption("Xdoclint:all,-missing", "-quiet")
}

check {
    dependsOn {
        javadoc
    }
}

spotless {
    java {
        googleJavaFormat()
    }
}

test {
    useJUnitPlatform()
}
