plugins {
    id 'java-library'
}

java {
    // We need to support Java 17 until all of our clients migrate to Java 21.
    toolchain {
        languageVersion = JavaLanguageVersion.of(17)
    }
}

dependencies {
    compileOnly group: 'io.micrometer', name: 'micrometer-core', version: versions.micrometer_metrics
    compileOnly group: 'org.glassfish.jersey.core', name: 'jersey-client', version: versions.jersey
    compileOnly group: 'org.glassfish.jersey.inject', name: 'jersey-hk2', version: versions.jersey
    compileOnly group: 'org.springframework', name: 'spring-web', version: versions.spring_web
    compileOnly group: 'org.springframework', name: 'spring-webflux', version: versions.spring_web
    compileOnly group: 'com.squareup.okhttp3', name: 'okhttp', version: versions.okhttp

    implementation group: 'dev.failsafe', name: 'failsafe', version: versions.failsafe
    api group: 'io.projectreactor', name: 'reactor-core', version: '3.6.5'

    testImplementation group: 'org.spockframework', name: 'spock-core', version: versions.spock
    testImplementation group: 'org.spockframework', name: 'spock-junit4', version: versions.spock
    testImplementation group: 'org.wiremock', name: 'wiremock-standalone', version: versions.wiremock
    testImplementation group: 'jakarta.servlet', name: 'jakarta.servlet-api', version: '6.0.0'
    testImplementation group: 'com.jayway.jsonpath', name: 'json-path', version: '2.9.0'

    testImplementation group: 'io.micrometer', name: 'micrometer-core', version: versions.micrometer_metrics
    testImplementation group: 'org.glassfish.jersey.core', name: 'jersey-client', version: versions.jersey
    testImplementation group: 'org.glassfish.jersey.inject', name: 'jersey-hk2', version: versions.jersey
    testImplementation group: 'org.springframework', name: 'spring-web', version: versions.spring_web
    testImplementation group: 'org.springframework', name: 'spring-context', version: versions.spring_web
    testImplementation group: 'org.springframework', name: 'spring-webflux', version: versions.spring_web
    testImplementation group: 'com.squareup.okhttp3', name: 'okhttp', version: versions.okhttp
    testImplementation group: 'io.projectreactor.netty', name: 'reactor-netty', version: '1.1.18'
    testImplementation group: 'io.projectreactor', name: 'reactor-test', version: '3.6.5'
}
