From 0d38b85d797af5a9d391bb127eba97f477ecf0c8 Mon Sep 17 00:00:00 2001 From: Vlad Mihalcea Date: Thu, 2 Jun 2016 09:54:24 +0300 Subject: [PATCH] Add Oracle and SQL Server dependencies based on the supplied db property --- build.gradle | 14 +++++++++++++- documentation/documentation.gradle | 12 ++++++++++++ 2 files changed, 25 insertions(+), 1 deletion(-) diff --git a/build.gradle b/build.gradle index 65c96b112e..dd79cf90e2 100644 --- a/build.gradle +++ b/build.gradle @@ -138,12 +138,24 @@ subprojects { subProject -> testRuntime( libraries.log4j ) testRuntime( libraries.javassist ) + testRuntime( libraries.woodstox ) + + //Databases testRuntime( libraries.h2 ) testRuntime( libraries.hsqldb ) testRuntime( libraries.postgresql ) testRuntime( libraries.mysql ) testRuntime( libraries.mariadb ) - testRuntime( libraries.woodstox ) + if (db.equalsIgnoreCase("oracle")) { + dependencies { + testRuntime( libraries.oracle ) + } + } + if (db.equalsIgnoreCase("mssql")) { + dependencies { + testRuntime( libraries.mssql ) + } + } // 6.6 gave me some NPE problems from within checkstyle... checkstyle 'com.puppycrawl.tools:checkstyle:6.5' diff --git a/documentation/documentation.gradle b/documentation/documentation.gradle index 7ae6595f32..26bab13258 100644 --- a/documentation/documentation.gradle +++ b/documentation/documentation.gradle @@ -69,10 +69,22 @@ dependencies { testCompile( project(':hibernate-testing') ) testCompile( project(path: ':hibernate-entitymanager', configuration: 'tests') ) + //Databases testRuntime( libraries.h2 ) testRuntime( libraries.hsqldb ) testRuntime( libraries.postgresql ) testRuntime( libraries.mysql ) + testRuntime( libraries.mariadb ) + if (db.equalsIgnoreCase("oracle")) { + dependencies { + testRuntime( libraries.oracle ) + } + } + if (db.equalsIgnoreCase("mssql")) { + dependencies { + testRuntime( libraries.mssql ) + } + } } processTestResources.doLast( {