dependencies {
    if (project.hasProperty("useNativeJdkAlpnProcessor")) {
        println "> Building with native JDK ALPN processor in default dependencies"
        api "org.eclipse.jetty:jetty-alpn-java-server:${jettyVersion}"
    } else {
        println "> Building with Jetty JDK ALPN OpenJDK 1.8 processor in default dependencies"
        api "org.eclipse.jetty:jetty-alpn-openjdk8-server:${jettyVersion}"
    }

    api "org.eclipse.jetty.websocket:websocket-api:${jettyVersion}"
    api "org.eclipse.jetty.websocket:websocket-server:${jettyVersion}"
    api "org.eclipse.jetty.websocket:websocket-client:${jettyVersion}"

    // https://github.com/eclipse/jetty.project/issues/1894
    // https://github.com/eclipse/jetty.project/issues/2950
    api "org.eclipse.jetty.http2:http2-server:${jettyVersion}"
    api "org.eclipse.jetty:jetty-servlets:${jettyVersion}"
    api "org.ehcache:ehcache:3.9.1"
    api "commons-cli:commons-cli:1.4"
    api "org.yaml:snakeyaml:${snakeYamlVersion}"
    api "org.skyscreamer:jsonassert:1.5.0"
    api "org.xmlunit:xmlunit-core:${xmlUnitVersion}"
    api "org.xmlunit:xmlunit-placeholders:${xmlUnitVersion}"
    api "io.github.azagniotov:collection-type-safe-converter:1.0.1"

    if (project.hasProperty("log4j")) {
        var becauseMsg = "CVE-2021-44228, CVE-2021-45046, CVE-2021-45105, CVE-2021-44832: Log4j vulnerable to remote code execution and other critical security vulnerabilities"
        println "> Building with log4j included in default dependencies"
        api "org.apache.logging.log4j:log4j-slf4j-impl:${log4j2Version}"
        api "org.apache.logging.log4j:log4j-api:${log4j2Version}"
        api "org.apache.logging.log4j:log4j-core:${log4j2Version}"

    } else {
        println "> Building with default dependencies"
        api "org.slf4j:slf4j-api:1.7.30"
    }
}

