buildscript {
    repositories { mavenCentral() }
    dependencies {
        classpath 'io.codearte.gradle.nexus:gradle-nexus-staging-plugin:0.5.3'
    }
}

plugins {
    id 'com.bmuschko.nexus' version '2.3.1'
}

apply plugin: 'java'
apply plugin: 'groovy'
apply plugin: 'io.codearte.nexus-staging'

project.group = 'pl.allegro.tech'
project.version = scmVersion.version
jar.baseName = 'embedded-elasticsearch'

dependencies {
    compile group: 'org.slf4j', name: 'slf4j-api', version: '1.7.21'
    compile group: 'commons-io', name: 'commons-io', version: '2.5'
    compile group: 'org.rauschig', name: 'jarchivelib', version: '1.0.0'
    compile group: 'org.apache.commons', name: 'commons-lang3', version: '3.4'
    compile group: 'org.apache.httpcomponents', name: 'httpclient', version: '4.5.2'
    compile group: 'com.fasterxml.jackson.core', name: 'jackson-databind', version: '2.6.2'
    compile group: 'com.fasterxml.jackson.dataformat', name: 'jackson-dataformat-yaml', version: '2.6.2'

    testCompile group: 'org.codehaus.groovy', name: 'groovy', version: '2.4.6'
    testCompile group: 'org.spockframework', name: 'spock-core', version: '1.0-groovy-2.4'
    testCompile group: 'ch.qos.logback', name: 'logback-classic', version: '1.1.7'
    testCompile group: 'org.skyscreamer', name: 'jsonassert', version: '1.3.0'
}

nexusStaging {
    packageGroup = 'pl.allegro'
    numberOfRetries = 15
    delayBetweenRetriesInMillis = 5000
}

modifyPom {
    project {
        name 'embedded-elasticsearch'
        description 'Tool that ease up creation of integration tests with Elasticsearch'
        url 'https://github.com/allegro/embedded-elasticsearch'
        inceptionYear '2016'

        scm {
            url 'https://github.com/allegro/embedded-elasticsearch'
            connection 'scm:git@github.com:allegro/embedded-elasticsearch.git'
            developerConnection 'scm:git@github.com:allegro/embedded-elasticsearch.git'
        }

        licenses {
            license {
                name 'The Apache Software License, Version 2.0'
                url 'http://www.apache.org/licenses/LICENSE-2.0.txt'
            }
        }

        developers {
            developer {
                id 'yukon'
                name 'YUKON'
            }
        }
    }
}
