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

airbyteBulkConnector {
    core = 'load'
    toolkits = ['load-s3', 'load-avro', 'load-aws']
}

application {
    mainClass = 'io.airbyte.integrations.destination.s3_v2.S3V2Destination'

    applicationDefaultJvmArgs = [
            '-XX:+ExitOnOutOfMemoryError', '-XX:MaxRAMPercentage=75.0',
//            Uncomment to run locally:
//          '--add-opens', 'java.base/java.lang=ALL-UNNAMED'
//            Uncomment to enable remote profiling:
//            '-XX:NativeMemoryTracking=detail',
//            '-Djava.rmi.server.hostname=localhost',
//            '-Dcom.sun.management.jmxremote=true',
//            '-Dcom.sun.management.jmxremote.port=6000',
//            '-Dcom.sun.management.jmxremote.rmi.port=6000',
//            '-Dcom.sun.management.jmxremote.local.only=false',
//            '-Dcom.sun.management.jmxremote.authenticate=false',
//            '-Dcom.sun.management.jmxremote.ssl=false'
    ]
}

// Uncomment to run locally
//run {
//    standardInput = System.in
//}

// Exclude conflicting log4j-over-slf4j dependency
configurations.all {
        exclude group: "org.slf4j", module: "slf4j-reload4j"
}
