
plugins {
    id 'checkstyle'
    id 'java'
    id 'io.github.goooler.shadow'
}

java {
    group = 'app.crossword.yourealwaysbe'

    test { useJUnitPlatform() }

    dependencies {
        def junitVersion = '5.10.2'
        testImplementation "org.junit.jupiter:junit-jupiter:$junitVersion"
        testImplementation "org.junit.jupiter:junit-jupiter-params:$junitVersion"
        testRuntimeOnly 'org.junit.platform:junit-platform-launcher'

        implementation 'net.iharder:base64:2.3.9'
        implementation 'org.apache.commons:commons-text:1.11.0'
        implementation 'org.hjson:hjson:3.1.0'
        implementation 'org.json:json:20240205'
        implementation 'org.jsoup:jsoup:1.21.2'
    }

    shadowJar {
        relocate 'org.json', 'app.crossword.yourealwaysbe.org.json'
    }

    compileJava {
        sourceCompatibility = JavaVersion.VERSION_17.toString()
        targetCompatibility = JavaVersion.VERSION_17.toString()

        // -processing as adding room annotation processor library
        // causes warnings about unprocessed annotations for an
        // unclear reason
        options.compilerArgs << '-Xlint:all' << '-Xlint:-processing'
    }
}
