plugins {
    id 'library-publication' // buildSrc/src/main/groovy/library-publication.gradle
    id 'java-test-fixtures'
}

dependencies {
    internal platform(project(":platform")) // all library versions should be specified in the platform project
    api project(":ecs-sync-model")

    implementation "com.zaxxer:HikariCP"
    implementation "com.google.code.gson:gson"
    implementation "com.mysql:mysql-connector-j"
    implementation "org.apache.commons:commons-csv"
    implementation "org.slf4j:slf4j-api"
    implementation "org.springframework:spring-jdbc"
    implementation "org.springframework:spring-context"
    implementation "org.xerial:sqlite-jdbc"
    // TODO: decouple this (find alternative to ProgressListener and ProgressInputStream)
    implementation "com.emc.ecs:object-client"
    //engineering.clientside:throttle library is no longer available for anonymous download from Maven, so its source code has been integrated directly into the project.
    //implementation "engineering.clientside:throttle"
    // jaxb was removed from Java 11 - jaxb dependencies are provided with Java 8
    implementation "javax.xml.bind:jaxb-api"

    testFixturesImplementation "org.junit.jupiter:junit-jupiter-api"
    testFixturesImplementation "org.slf4j:slf4j-api"
    testFixturesImplementation "org.apache.logging.log4j:log4j-core"
    testFixturesImplementation "org.slf4j:log4j-over-slf4j" // for dependencies using log4j 1.2
    testFixturesImplementation "org.slf4j:jcl-over-slf4j" // for dependencies using commons-logging
    testFixturesImplementation "org.springframework:spring-jdbc"
    // jaxb was removed from Java 11 - jaxb dependencies are provided with Java 8
    testFixturesImplementation "javax.xml.bind:jaxb-api"

    testImplementation "org.junit.jupiter:junit-jupiter-api"
    // TODO: decouple this (emulate a sync query error in SyncProcessTest)
    testImplementation project(":storage-plugins:filesystem-storage")

    testRuntimeOnly "org.junit.jupiter:junit-jupiter-engine"
    testRuntimeOnly "org.apache.logging.log4j:log4j-slf4j-impl"
    testRuntimeOnly "org.slf4j:log4j-over-slf4j" // for dependencies using log4j 1.2
    testRuntimeOnly "org.slf4j:jcl-over-slf4j" // for dependencies using commons-logging
}

test {
    useJUnitPlatform()
}

// prevents publishing the test fixtures
components.java.withVariantsFromConfiguration(configurations.testFixturesApiElements) { skip() }
components.java.withVariantsFromConfiguration(configurations.testFixturesRuntimeElements) { skip() }
