buildscript {
    repositories {
        maven { url "http://oss.jfrog.org/artifactory/repo" }
        jcenter()
    }
    dependencies {
        classpath 'io.ratpack:ratpack-gradle:0.9.14'
    }
}

apply plugin: "io.ratpack.ratpack-groovy"
apply plugin: "idea"
apply plugin: "eclipse"

idea {
    project {
        jdkName "1.8"
        languageLevel "1.8"
        ipr {
            withXml { provider ->
                def node = provider.asNode()
                //configure git support for the project in idea
                node.component.find { it.'@name' == 'VcsDirectoryMappings' }?.mapping[0].'@vcs' = 'Git'
            }
        }
    }
}

repositories {
    jcenter()
    maven { url 'http://clinker.netty.io/nexus/content/repositories/snapshots' }
    maven { url "http://oss.jfrog.org/artifactory/repo" }
}

configurations.all {
    exclude module: "groovy"
}

dependencies {
    // SpringLoaded enables runtime hot reloading.
    // It is not part of the app runtime and is not shipped in the distribution.
    // springloaded "org.springframework:springloaded:1.2.1.RELEASE"

    compile 'io.ratpack:ratpack-config:0.9.14'
    compile 'org.apache.curator:curator-framework:2.7.1'
    compile 'com.netflix.archaius:archaius-core:0.6.0'
    compile 'com.netflix.archaius:archaius-zookeeper:0.6.0'

    // Default SLF4J binding. Note that this is a blocking implementation.
    // See here for a non blocking appender http://logging.apache.org/log4j/2.x/manual/async.html
    runtime 'org.slf4j:slf4j-simple:1.7.7'

    testCompile "org.spockframework:spock-core:0.7-groovy-2.0", {
        exclude module: "groovy-all"
    }
}

run {
    systemProperty 'archaius.deployment.applicationId', 'archaius'
    systemProperty 'archaius.deployment.environment', 'sandbox'
}
