plugins {
    id 'application'
    id 'airbyte-java-connector'
    id "io.airbyte.gradle.docker"
    id 'airbyte-connector-docker-convention'
}

airbyteJavaConnector {
    cdkVersionRequired = '0.29.10'
    features = ['db-destinations', 's3-destinations', 'typing-deduping']
    useLocalCdk = false
}

//remove once upgrading the CDK version to 0.4.x or later
java {
    compileJava {
        options.compilerArgs.remove("-Werror")
    }
}

airbyteJavaConnector.addCdkDependencies()

application {
    mainClass = 'io.airbyte.integrations.destination.oracle_strict_encrypt.OracleStrictEncryptDestination'
    applicationDefaultJvmArgs = ['-XX:+ExitOnOutOfMemoryError', '-XX:MaxRAMPercentage=75.0']
}

dependencies {

    // required so that log4j uses a standard xml parser instead of an oracle one (that gets pulled in by the oracle driver)
    implementation group: 'xerces', name: 'xercesImpl', version: '2.12.1'

    implementation project(':airbyte-integrations:connectors:destination-oracle')

    implementation "com.oracle.database.jdbc:ojdbc8-production:19.7.0.0"

    testImplementation 'org.apache.commons:commons-lang3:3.11'
    testImplementation 'org.testcontainers:oracle-xe:1.19.0'

    integrationTestJavaImplementation project(':airbyte-integrations:connectors:destination-oracle')
}
