import org.jetbrains.kotlin.gradle.dsl.JvmTarget
import org.jetbrains.kotlin.gradle.dsl.KotlinVersion

compileTestFixturesKotlin {
    compilerOptions {
        allWarningsAsErrors = false
    }
}

compileTestKotlin {
    compilerOptions {
        allWarningsAsErrors = false
    }
}

dependencies {
    implementation project(':airbyte-cdk:java:airbyte-cdk:airbyte-cdk-dependencies')
    implementation project(':airbyte-cdk:java:airbyte-cdk:airbyte-cdk-core')
    implementation project(':airbyte-cdk:java:airbyte-cdk:airbyte-cdk-typing-deduping')
    implementation project(':airbyte-cdk:java:airbyte-cdk:airbyte-cdk-db-destinations')

    // Re-export dependencies for gcs-destinations.
    api 'com.amazonaws:aws-java-sdk-s3:1.12.772'
    api 'com.amazonaws:aws-java-sdk-sts:1.12.772'
    api ('com.github.airbytehq:json-avro-converter:1.1.3') { exclude group: 'ch.qos.logback', module: 'logback-classic'}
    api 'com.github.alexmojaki:s3-stream-upload:2.2.4'
    api 'org.apache.avro:avro:1.12.0'
    api 'org.apache.commons:commons-csv:1.11.0'
    api 'org.apache.commons:commons-text:1.12.0'
    api ('org.apache.hadoop:hadoop-aws:3.4.0') {
        exclude group: 'com.amazonaws', module: 'aws-java-sdk-bundle'
        // The below dependencies contain security vulnerabilities and are unused.
        exclude group: 'software.amazon.awssdk', module: 'bundle'
    }
    api ('org.apache.hadoop:hadoop-common:3.4.0') {
        exclude group: 'org.apache.zookeeper'
        exclude group: 'org.apache.hadoop', module: 'hadoop-yarn-common'
        // The below dependencies contain security vulnerabilities and are unused.
        exclude group: 'com.google.protobuf'
        exclude group: "com.nimbusds", module: "nimbus-jose-jwt"
        exclude group: 'dnsjava'
        exclude group: 'io.netty'
        exclude group: "org.apache.hadoop.thirdparty", module: "hadoop-shaded-protobuf_3_21"
    }
    api ('org.apache.hadoop:hadoop-mapreduce-client-core:3.4.0') {
        exclude group: 'org.apache.zookeeper'
        exclude group: 'org.apache.hadoop', module: 'hadoop-yarn-common'
        // The below dependencies contain security vulnerabilities and are unused.
        exclude group: 'com.google.protobuf'
        exclude group: 'io.netty'
        exclude group: "org.apache.hadoop.thirdparty", module: "hadoop-shaded-protobuf_3_21"
    }
    api 'org.apache.parquet:parquet-avro:1.15.1'
    runtimeOnly 'com.hadoop.gplcompression:hadoop-lzo:0.4.20'

    testFixturesApi project(':airbyte-cdk:java:airbyte-cdk:airbyte-cdk-dependencies')
    testFixturesApi testFixtures(project(':airbyte-cdk:java:airbyte-cdk:airbyte-cdk-dependencies'))
    testFixturesApi project(':airbyte-cdk:java:airbyte-cdk:airbyte-cdk-core')
    testFixturesApi testFixtures(project(':airbyte-cdk:java:airbyte-cdk:airbyte-cdk-core'))
    testFixturesApi project(':airbyte-cdk:java:airbyte-cdk:airbyte-cdk-typing-deduping')
    testFixturesApi testFixtures(project(':airbyte-cdk:java:airbyte-cdk:airbyte-cdk-typing-deduping'))
    testFixturesApi project(':airbyte-cdk:java:airbyte-cdk:airbyte-cdk-db-destinations')
    testFixturesApi testFixtures(project(':airbyte-cdk:java:airbyte-cdk:airbyte-cdk-db-destinations'))

    testImplementation 'org.mockito:mockito-inline:5.2.0'
}
