buildscript {
    repositories {
        mavenCentral()
    }
    dependencies {
        classpath "io.spring.gradle:dependency-management-plugin:0.6.0.RELEASE"
        // if using Stub Runner (consumer side) only remove this dependency
        classpath "org.springframework.cloud:spring-cloud-contract-gradle-plugin:1.1.1.RELEASE"
    }
}

apply plugin: "io.spring.dependency-management"
apply plugin: 'spring-cloud-contract'

dependencyManagement {
    imports {
        mavenBom 'org.springframework.cloud:spring-cloud-contract-dependencies:1.1.1.RELEASE'
    }
}

dependencies {
    testCompile 'org.springframework.cloud:spring-cloud-starter-contract-verifier'
}

contracts {
    contractsDslDir = new File("../common-contracts/src/main/resources/contracts")
    baseClassForTests = 'net.chrisrichardson.eventstore.examples.customersandorders.customersservice.web.AbstractCustomerServiceContractTest'
}


apply plugin: 'org.springframework.boot'

dependencies {
    compile project(":customers-service-api-web")
    compile project(":customers-service-api-messaging")
    compile project(":orders-service-api-messaging")
    compile project(":common-swagger")

    testCompile 'com.jayway.restassured:rest-assured:2.9.0'
    testCompile 'com.jayway.restassured:spring-mock-mvc:2.9.0'

    compile "org.springframework.boot:spring-boot-starter-web:$springBootVersion"
    compile "org.springframework.boot:spring-boot-starter-actuator:$springBootVersion"
    compile "io.eventuate.local.java:eventuate-local-java-spring-jdbc-starter"

    testCompile "net.chrisrichardson.eventstore.examples.customersandorders:common-contracts:1.0-SNAPSHOT"
    testCompile 'com.pholser:junit-quickcheck-core:0.7'
    testCompile 'com.pholser:junit-quickcheck-generators:0.7'
    testCompile "junit:junit:4.12"
    testCompile "org.springframework.boot:spring-boot-starter-test:$springBootVersion"
    testCompile "io.eventuate.local.java:eventuate-client-java-spring-jdbc"

}
