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

airbyteJavaConnector {
    cdkVersionRequired = '0.48.18'
    features = ['db-sources']
    useLocalCdk = false
}

java {
    // TODO: rewrite code to avoid javac warnings in the first place
    compileJava {
        options.compilerArgs += "-Xlint:-try,-rawtypes"
    }
    compileTestFixturesJava {
        options.compilerArgs += "-Xlint:-this-escape"
    }
}

application {
    mainClass = 'io.airbyte.integrations.source.mssql.MssqlSource'
    applicationDefaultJvmArgs = ['-XX:+ExitOnOutOfMemoryError', '-XX:MaxRAMPercentage=75.0']
}

dependencies {
    implementation 'com.microsoft.sqlserver:mssql-jdbc:12.10.0.jre11'
    implementation 'io.debezium:debezium-embedded:3.0.7.Final'
    implementation 'io.debezium:debezium-connector-sqlserver:3.0.7.Final'
    implementation 'org.codehaus.plexus:plexus-utils:3.4.2'

    testFixturesImplementation 'org.testcontainers:mssqlserver:1.19.0'

    testImplementation 'org.awaitility:awaitility:4.2.0'
    testImplementation 'org.hamcrest:hamcrest-all:1.3'
    testImplementation 'org.testcontainers:mssqlserver:1.19.0'
}

compileKotlin {

}
