dependencies {
    implementation(project(path: ":embulk-output-jdbc", configuration: "runtimeElements"))
    implementation(project(path: ":embulk-output-postgresql", configuration: "runtimeElements"))
    implementation "org.postgresql:postgresql:9.4-1205-jdbc41"

    implementation("com.amazonaws:aws-java-sdk-s3:1.11.523") {
        exclude group: "joda-time", module: "joda-time"
        exclude group: "com.fasterxml.jackson.core", module: "jackson-annotations"
        exclude group: "com.fasterxml.jackson.core", module: "jackson-databind"
        exclude group: "com.fasterxml.jackson.core", module: "jackson-core"
    }
    implementation("com.amazonaws:aws-java-sdk-sts:1.11.523") {
        exclude group: "joda-time", module: "joda-time"
        exclude group: "com.fasterxml.jackson.core", module: "jackson-annotations"
        exclude group: "com.fasterxml.jackson.core", module: "jackson-databind"
        exclude group: "com.fasterxml.jackson.core", module: "jackson-core"
    }
    implementation("org.embulk:embulk-util-aws-credentials:0.4.2") {
        exclude group: "org.slf4j", module: "slf4j-api"
    }

    // Joda-Time has been removed from Embulk since v0.10.30.
    // Ordinary plugins no longer need Joda-Time, but embulk-output-redshift depends on Joda-Time as aws-java-sdk-s3 depends.
    implementation "joda-time:joda-time:2.9.2"

    testImplementation project(':embulk-output-jdbc').sourceSets.test.output
}

embulkPlugin {
    mainClass = "org.embulk.output.RedshiftOutputPlugin"
    category = "output"
    type = "redshift"
}

publishing {
    publications {
        maven(MavenPublication) {
            pom {  // https://central.sonatype.org/pages/requirements.html
                developers {
                    developer {
                        name = "Sadayuki Furuhashi"
                        email = "frsyuki@gmail.com"
                    }
                    developer {
                        name = "Hitoshi Tanaka"
                        email = "thitoshi@cac.co.jp"
                    }
                    developer {
                        name = "Hiroyuki Sato"
                        email = "hiroysato@gmail.com"
                    }
                    developer {
                        name = "Antoine Augusti"
                        email = "hi@antoine-augusti.fr"
                    }
                    developer {
                        name = "Michael Jalkio"
                        email = "mjalkio@gmail.com"
                    }
                    developer {
                        name = "Yutaka Nishimura"
                        email = "ytk.nishimura@gmail.com"
                    }
                    developer {
                        name = "Dai MIKURUBE"
                        email = "dmikurube@treasure-data.com"
                    }
                }
            }
        }
    }
}
