subprojects {
    bintray {
        pkg {
            repo = 'micro-deps'
        }
    }
}

project(':micro-deps-root:micro-deps') {
    description = 'Microservice dependency manager'

    dependencies {
        compile 'org.apache.curator:curator-x-discovery'
        compile 'org.apache.curator:curator-test'
        compile 'com.google.guava:guava'
        compile 'commons-io:commons-io'
        compile 'org.codehaus.groovy.modules.http-builder:http-builder:0.7.2'
        compile 'log4j:log4j:1.2.17'

        testCompile 'org.codehaus.groovy:groovy-all'
        testCompile 'org.spockframework:spock-core'
        testCompile 'info.solidsoft.spock:spock-global-unroll'
        testCompile 'org.awaitility:awaitility-groovy'
    }
}

project(':micro-deps-root:micro-deps-jax-rs-jersey') {
    description = 'Microservice dependency manager with JAR-RS support'

    configurations {
        all*.exclude group: 'com.sun.jersey'
    }

    dependencies {
        compile 'javax.ws.rs:javax.ws.rs-api:2.0.1'
        compile 'org.glassfish.jersey.core:jersey-client:2.22.1'
        compile 'org.glassfish.jersey.ext:jersey-proxy-client:2.22.1'
        compile project(':micro-deps-root:micro-deps')

        testCompile 'org.springframework.boot:spring-boot-starter-web'
        testCompile 'org.springframework.boot:spring-boot-starter-test'
        testCompile 'org.springframework.boot:spring-boot-starter-actuator'
        testCompile 'org.springframework.boot:spring-boot-starter-jersey'
        testCompile 'org.springframework.boot:spring-boot-starter-tomcat'

        testCompile project(':micro-deps-root:micro-deps-spring-config')
        testCompile 'org.codehaus.groovy:groovy-all'
        testCompile 'org.spockframework:spock-core'
        testCompile 'info.solidsoft.spock:spock-global-unroll'
        testCompile 'org.awaitility:awaitility-groovy'
    }
}

project(':micro-deps-root:micro-deps-spring-config') {
    description = 'Microservice dependency manager - default Spring configuration'

    sourceSets.main.java.srcDirs = []
    sourceSets.main.groovy.srcDirs += ["src/main/java", "src/main/groovy"]

    dependencies {
        compile project(':micro-deps-root:micro-deps')
        compile(project(':stub-runner-root:stub-runner-spring')) {
            exclude group: 'org.slf4j', module: 'log4j-over-slf4j'
        }
        compile 'org.springframework:spring-context'
        compile 'org.springframework.cloud:spring-cloud-starter-zookeeper-discovery'
        compile 'org.springframework.cloud:spring-cloud-starter-sleuth'
        compile 'io.reactivex:rxjava'

        testCompile 'org.codehaus.groovy:groovy-all'
        testCompile 'org.spockframework:spock-core'
        testCompile 'org.spockframework:spock-spring'
        testCompile 'info.solidsoft.spock:spock-global-unroll'
        testCompile 'org.springframework:spring-test'
        testCompile 'org.springframework:spring-webmvc'
        testCompile 'io.rest-assured:rest-assured'
        testCompile 'org.slf4j:slf4j-api'
        testCompile 'cglib:cglib-nodep'
        testCompile 'org.objenesis:objenesis'
    }
}

project(':micro-deps-root:micro-deps-spring-test-config') {
    description = 'Microservice dependency manager - Spring test configuration'

    dependencies {
        compile project(':micro-deps-root:micro-deps-spring-config')
        compile 'org.codehaus.groovy:groovy-all'
        compile 'cglib:cglib-nodep'
        compile 'org.objenesis:objenesis'
        compile 'org.aspectj:aspectjweaver'

        compile 'org.spockframework:spock-core'
        compile 'org.spockframework:spock-spring'
        compile 'org.springframework:spring-webmvc'
        compile 'org.springframework:spring-test'
        compile 'com.github.tomakehurst:wiremock-standalone'
        compile 'javax.servlet:javax.servlet-api:3.1.0'

        testCompile 'io.rest-assured:rest-assured'
    }
}
