ext {

  springVersion = '4.1.2.RELEASE'
  springSecurityVersion = '3.2.3.RELEASE'
  spockVersion = '0.7-groovy-2.0'
  gebSpockVersion = '0.9.2'
  groovyVersion = '2.2.1'
  log4jVersion = "1.2.17"
  jacksonVersion = "2.1.5"
  slf4jVersion = '1.7.5'
  logbackVersion = '1.1.2'
  tomcatVersion = '7.0.53'
  swaggerSpringMvcVersion = System.getenv('LATEST_SSMVC_VERSION') ?:'1.0.3-SNAPSHOT'
  swaggerUiVersion = '2.0.17'
  seleniumVersion = '2.41.0'
  chromeDriverVersion = '2.41.0'
  firefoxDriverVersion = '2.41.0'
  swaggerUiDist = "build/libs/swagger-ui-dist.zip"
  swaggerUiExplodedDir = "swagger-ui-${swaggerUiVersion}/dist/"
  bootVersion = '1.1.3.RELEASE'
}

logger.quiet("--------- Building with swaggerSpringMvcVersion ${swaggerSpringMvcVersion}")

ext.libs = [

        swagger       : [
                "com.mangofactory:swagger-springmvc:$swaggerSpringMvcVersion"
        ],

        swaggerSpringMvcUi: [
                "org.ajar:swagger-spring-mvc-ui:0.4"
        ],

        springWeb     : { String version = springVersion ->
          return [
                  "org.springframework:spring-web:$version",
                  "org.springframework:spring-webmvc:$version",
                  "org.springframework:spring-context-support:$version",
                  "org.springframework:spring-test:$version",
                  "org.springframework.hateoas:spring-hateoas:0.12.0.RELEASE",
                  "org.springframework.security:spring-security-web:${springSecurityVersion}",
                  "org.springframework.security:spring-security-config:${springSecurityVersion}",
                  "javax.servlet:jstl:1.2"
          ]
        },

        jackson       : [
                "com.fasterxml.jackson.core:jackson-core:${jacksonVersion}",
                "com.fasterxml.jackson.core:jackson-databind:${jacksonVersion}",
                "com.fasterxml.jackson.datatype:jackson-datatype-joda:${jacksonVersion}",
                "com.fasterxml.jackson.module:jackson-module-jaxb-annotations:${jacksonVersion}",
        ],

        validation    : ['org.hibernate:hibernate-validator:5.0.2.Final'],

        logging       : [
                "org.slf4j:slf4j-api:${slf4jVersion}",
                "ch.qos.logback:logback-classic:$logbackVersion",
                "ch.qos.logback:logback-core:$logbackVersion",
        ],

        functionalTest: [
                "org.codehaus.groovy:groovy-all:${groovyVersion}",
                "org.codehaus.groovy.modules.http-builder:http-builder:0.7.1",
                "org.spockframework:spock-core:${spockVersion}",
        ],

        acceptanceTest: [
                "org.codehaus.groovy:groovy-all:${groovyVersion}",
                "org.spockframework:spock-core:${spockVersion}",
                "org.gebish:geb-spock:${gebSpockVersion}",
                "org.seleniumhq.selenium:selenium-support:${seleniumVersion}",
//                "org.seleniumhq.selenium:selenium-remote-driver:${seleniumVersion}",
                "org.seleniumhq.selenium:selenium-chrome-driver:${chromeDriverVersion}",
                "org.seleniumhq.selenium:selenium-firefox-driver:${firefoxDriverVersion}",
        ]
]