From 49f904b450ec693e3e968072480dab13be7abcf8 Mon Sep 17 00:00:00 2001 From: Alexander Alexeev Date: Tue, 6 Dec 2016 21:19:47 +0700 Subject: common configuration for tests --- build.gradle | 11 +++++++---- juick-api/build.gradle | 5 +++-- juick-notifications/build.gradle | 5 ++++- juick-server/build.gradle | 3 ++- juick-spring-www/build.gradle | 3 ++- juick-xmpp/build.gradle | 4 ++++ 6 files changed, 22 insertions(+), 9 deletions(-) diff --git a/build.gradle b/build.gradle index a32de4f1..c076bfd7 100644 --- a/build.gradle +++ b/build.gradle @@ -11,6 +11,8 @@ project.ext { jacksonVersion = '2.8.5' slf4jVersion = '1.7.21' logbackVersion = '1.1.7' + junitVersion = "4.12" + hamcrestVersion= "1.3" } buildscript { @@ -32,14 +34,15 @@ dependencies { testCompile project(':juick-core') testCompile project(':juick-www') testCompile project(':juick-xmpp') - testCompile 'org.json:json:20160810' + testCompile "org.json:json:20160810" testCompile "com.fasterxml.jackson.core:jackson-core:${jacksonVersion}" testCompile "com.fasterxml.jackson.core:jackson-databind:${jacksonVersion}" testCompile "org.springframework:spring-jdbc:${springFrameworkVersion}" - testCompile 'ch.vorburger.mariaDB4j:mariaDB4j:2.2.2' + testCompile "ch.vorburger.mariaDB4j:mariaDB4j:2.2.2" testCompile "org.slf4j:slf4j-api:${slf4jVersion}" - testCompile 'junit:junit:4.12' - testRuntime 'mysql:mysql-connector-java:5.1.40' + testCompile "junit:junit:${junitVersion}" + testCompile "org.hamcrest:hamcrest-all:${hamcrestVersion}" + testRuntime "mysql:mysql-connector-java:5.1.40" } compileJava.options.encoding = 'UTF-8' diff --git a/juick-api/build.gradle b/juick-api/build.gradle index 234ec006..c160da96 100644 --- a/juick-api/build.gradle +++ b/juick-api/build.gradle @@ -19,11 +19,12 @@ dependencies { compile 'net.coobird:thumbnailator:0.4.8' providedRuntime 'mysql:mysql-connector-java:5.1.40' - testCompile "junit:junit:4.12" - testCompile "org.hamcrest:hamcrest-all:1.3" + testCompile "junit:junit:${rootProject.junitVersion}" + testCompile "org.hamcrest:hamcrest-all:${rootProject.hamcrestVersion}" testCompile "org.mockito:mockito-core:1.+" testCompile "org.springframework:spring-test:${rootProject.springFrameworkVersion}" testCompile "org.springframework.security:spring-security-test:${rootProject.springSecurityVersion}" + testRuntime 'com.jayway.jsonpath:json-path:2.2.0' } diff --git a/juick-notifications/build.gradle b/juick-notifications/build.gradle index 80795368..41fa1206 100644 --- a/juick-notifications/build.gradle +++ b/juick-notifications/build.gradle @@ -9,8 +9,11 @@ dependencies { compile 'com.notnoop.apns:apns:1.0.0.Beta6' compile "org.springframework:spring-webmvc:${rootProject.springFrameworkVersion}" compile 'com.mitchellbosecke:pebble-spring4:2.3.0' + providedRuntime 'mysql:mysql-connector-java:5.1.40' - testCompile 'junit:junit:4.12' + + testCompile "junit:junit:${rootProject.junitVersion}" + testCompile "org.hamcrest:hamcrest-all:${rootProject.hamcrestVersion}" testCompile "org.mockito:mockito-core:1.+" } diff --git a/juick-server/build.gradle b/juick-server/build.gradle index 550f41c5..b9637080 100644 --- a/juick-server/build.gradle +++ b/juick-server/build.gradle @@ -41,7 +41,8 @@ dependencies { compile 'org.bitbucket.sco0ter.babbler:xmpp-extensions-client:0ba6c0e2f9' testCompile "ch.vorburger.mariaDB4j:mariaDB4j:2.2.2" - testCompile "junit:junit:4.12" + testCompile "junit:junit:${rootProject.junitVersion}" + testCompile "org.hamcrest:hamcrest-all:${rootProject.hamcrestVersion}" testCompile "org.mockito:mockito-core:1.+" testCompile "org.springframework:spring-test:${rootProject.springFrameworkVersion}" testCompile "org.springframework.security:spring-security-test:${rootProject.springSecurityVersion}" diff --git a/juick-spring-www/build.gradle b/juick-spring-www/build.gradle index f4ad8595..fc81c0b3 100644 --- a/juick-spring-www/build.gradle +++ b/juick-spring-www/build.gradle @@ -31,7 +31,8 @@ dependencies { compile "org.thymeleaf.extras:thymeleaf-extras-springsecurity4:3.0.1.RELEASE" compile "nz.net.ultraq.thymeleaf:thymeleaf-layout-dialect:2.1.2" - testCompile "junit:junit:4.12" + testCompile "junit:junit:${rootProject.junitVersion}" + testCompile "org.hamcrest:hamcrest-all:${rootProject.hamcrestVersion}" testCompile "org.mockito:mockito-core:1.+" testCompile "org.springframework:spring-test:${rootProject.springFrameworkVersion}" testCompile "ch.vorburger.mariaDB4j:mariaDB4j:2.2.2" diff --git a/juick-xmpp/build.gradle b/juick-xmpp/build.gradle index 808166b6..37f3ea1d 100644 --- a/juick-xmpp/build.gradle +++ b/juick-xmpp/build.gradle @@ -17,6 +17,10 @@ dependencies { compile 'com.mitchellbosecke:pebble-spring4:2.3.0' compile 'net.jodah:failsafe:1.0.0' providedRuntime 'mysql:mysql-connector-java:5.1.40' + + testCompile "junit:junit:${rootProject.junitVersion}" + testCompile "org.hamcrest:hamcrest-all:${rootProject.hamcrestVersion}" + testCompile "org.mockito:mockito-core:1.+" } compileJava.options.encoding = 'UTF-8' -- cgit v1.2.3