Skip to content

Commit

Permalink
JDBC drivers updated to the latest
Browse files Browse the repository at this point in the history
  • Loading branch information
Tapac committed Nov 16, 2020
1 parent cb29f3f commit c390ab0
Show file tree
Hide file tree
Showing 6 changed files with 38 additions and 63 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -40,3 +40,21 @@ fun Project.setupDialectTest(dialect: String) {
}
}
}

fun setupTestDriverDependencies(dialect: String, testImplementationSetup: (group: String, artifactId: String, version: String) -> Unit) {
testImplementationSetup("org.xerial", "sqlite-jdbc", Versions.sqlLite3)
testImplementationSetup("com.h2database", "h2", Versions.h2)
when (dialect) {
"mariadb" -> testImplementationSetup("org.mariadb.jdbc", "mariadb-java-client", Versions.mariaDB)
"mysql" -> testImplementationSetup("mysql", "mysql-connector-java", Versions.mysql51)
"mysql8" -> testImplementationSetup("mysql", "mysql-connector-java", Versions.mysql80)
"oracle" -> testImplementationSetup("com.oracle.database.jdbc", "ojdbc8", Versions.oracle12)
"sqlserver" -> testImplementationSetup("com.microsoft.sqlserver", "mssql-jdbc", Versions.sqlserver)
else -> {
testImplementationSetup("com.h2database", "h2", Versions.h2)
testImplementationSetup("mysql", "mysql-connector-java", Versions.mysql51)
testImplementationSetup("org.postgresql", "postgresql", Versions.postgre)
testImplementationSetup("com.impossibl.pgjdbc-ng", "pgjdbc-ng", Versions.postgreNG)
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,14 @@ object Versions {

/** JDBC drivers **/
const val h2 = "1.4.199"
const val mariaDB = "2.6.0"
const val mysqlMxj = "5.0.12"
const val mariaDB = "2.7.0"
const val mysql51 = "5.1.49"
const val mysql80 = "8.0.20"
const val mysql80 = "8.0.22"
const val oracle12 = "12.2.0.1"
const val postgre = "42.2.12.jre6"
const val postgreNG = "0.8.4"
const val sqlLite3 = "3.31.1"
const val sqlserver = "8.2.2.jre8"
const val postgre = "42.2.18.jre6"
const val postgreNG = "0.8.6"
const val sqlLite3 = "3.32.3.2"
const val sqlserver = "8.4.1.jre8"

/** Spring **/
const val springFramework = "5.2.9.RELEASE"
Expand Down
18 changes: 3 additions & 15 deletions exposed-java-time/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import org.gradle.api.tasks.testing.logging.TestExceptionFormat
import org.gradle.api.tasks.testing.logging.TestLogEvent
import org.jetbrains.exposed.gradle.setupDialectTest
import org.jetbrains.exposed.gradle.Versions
import org.jetbrains.exposed.gradle.setupTestDriverDependencies
import org.jetbrains.kotlin.gradle.dsl.KotlinJvmCompile
import tanvd.kosogor.proxy.publishJar

Expand All @@ -23,22 +23,10 @@ dependencies {
testImplementation(kotlin("test-junit"))

testImplementation("com.opentable.components", "otj-pg-embedded", "0.12.0")
testImplementation("org.xerial", "sqlite-jdbc", Versions.sqlLite3)
testImplementation("com.h2database", "h2", Versions.h2)
testRuntimeOnly("org.testcontainers", "testcontainers", "1.14.3")

when (dialect) {
"mariadb" -> testImplementation("org.mariadb.jdbc", "mariadb-java-client", Versions.mariaDB)
"mysql" -> testImplementation("mysql", "mysql-connector-java", Versions.mysql51)
"mysql8" -> testImplementation("mysql", "mysql-connector-java", Versions.mysql80)
"oracle" -> testImplementation("com.oracle.database.jdbc", "ojdbc8", Versions.oracle12)
"sqlserver" -> testImplementation("com.microsoft.sqlserver", "mssql-jdbc", Versions.sqlserver)
else -> {
testImplementation("com.h2database", "h2", Versions.h2)
testImplementation("mysql", "mysql-connector-java", Versions.mysql51)
testImplementation("org.postgresql", "postgresql", Versions.postgre)
testImplementation("com.impossibl.pgjdbc-ng", "pgjdbc-ng", Versions.postgreNG)
}
setupTestDriverDependencies(dialect) { group, artifactId, version ->
testImplementation(group, artifactId, version)
}
}

Expand Down
18 changes: 3 additions & 15 deletions exposed-jodatime/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import org.jetbrains.exposed.gradle.setupDialectTest
import org.jetbrains.exposed.gradle.Versions
import org.jetbrains.exposed.gradle.setupTestDriverDependencies
import tanvd.kosogor.proxy.publishJar

plugins {
Expand All @@ -21,22 +21,10 @@ dependencies {
testImplementation(kotlin("test-junit"))

testImplementation("com.opentable.components", "otj-pg-embedded", "0.12.0")
testImplementation("org.xerial", "sqlite-jdbc", Versions.sqlLite3)
testImplementation("com.h2database", "h2", Versions.h2)
testRuntimeOnly("org.testcontainers", "testcontainers", "1.14.3")

when (dialect) {
"mariadb" -> testImplementation("org.mariadb.jdbc", "mariadb-java-client", Versions.mariaDB)
"mysql" -> testImplementation("mysql", "mysql-connector-java", Versions.mysql51)
"mysql8" -> testImplementation("mysql", "mysql-connector-java", Versions.mysql80)
"oracle" -> testImplementation("com.oracle.database.jdbc", "ojdbc8", Versions.oracle12)
"sqlserver" -> testImplementation("com.microsoft.sqlserver", "mssql-jdbc", Versions.sqlserver)
else -> {
testImplementation("com.h2database", "h2", Versions.h2)
testImplementation("mysql", "mysql-connector-java", Versions.mysql51)
testImplementation("org.postgresql", "postgresql", Versions.postgre)
testImplementation("com.impossibl.pgjdbc-ng", "pgjdbc-ng", Versions.postgreNG)
}
setupTestDriverDependencies(dialect) { group, artifactId, version ->
testImplementation(group, artifactId, version)
}
}

Expand Down
15 changes: 3 additions & 12 deletions exposed-money/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import org.jetbrains.exposed.gradle.setupDialectTest
import org.jetbrains.exposed.gradle.setupTestDriverDependencies
import tanvd.kosogor.proxy.publishJar

plugins {
Expand All @@ -25,18 +26,8 @@ dependencies {
testImplementation("com.h2database", "h2", "1.4.199")
testImplementation("org.javamoney", "moneta", "1.3")
testRuntimeOnly("org.testcontainers", "testcontainers", "1.14.3")

when (dialect) {
"mariadb" -> testImplementation("org.mariadb.jdbc", "mariadb-java-client", "2.4.1")
"mysql" -> testImplementation("mysql", "mysql-connector-java", "8.0.16")
"oracle" -> testImplementation("com.oracle", "ojdbc6", "12.1.0.1-atlassian-hosted")
"sqlserver" -> testImplementation("com.microsoft.sqlserver", "mssql-jdbc", "7.2.2.jre8")
else -> {
testImplementation("com.h2database", "h2", "1.4.199")
testImplementation("mysql", "mysql-connector-java", "5.1.48")
testImplementation("org.postgresql", "postgresql", "42.2.5.jre6")
testImplementation("com.impossibl.pgjdbc-ng", "pgjdbc-ng", "0.8.3")
}
setupTestDriverDependencies(dialect) { group, artifactId, version ->
testImplementation(group, artifactId, version)
}
}

Expand Down
19 changes: 5 additions & 14 deletions exposed-tests/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import org.gradle.api.tasks.testing.logging.TestExceptionFormat
import org.gradle.api.tasks.testing.logging.TestLogEvent
import org.jetbrains.exposed.gradle.setupDialectTest
import org.jetbrains.exposed.gradle.Versions
import org.jetbrains.exposed.gradle.setupTestDriverDependencies


plugins {
Expand All @@ -27,23 +28,13 @@ dependencies {
implementation("org.jetbrains.kotlinx","kotlinx-coroutines-debug", Versions.kotlinCoroutines)

implementation("com.opentable.components", "otj-pg-embedded", "0.12.0")
implementation("org.xerial", "sqlite-jdbc", Versions.sqlLite3)
implementation("com.h2database", "h2", Versions.h2)
implementation("org.testcontainers", "testcontainers", "1.14.3")
implementation("org.testcontainers", "mysql", "1.14.3")

when (dialect) {
"mariadb" -> implementation("org.mariadb.jdbc", "mariadb-java-client", Versions.mariaDB)
"mysql" -> implementation("mysql", "mysql-connector-java", Versions.mysql51)
"mysql8" -> implementation("mysql", "mysql-connector-java", Versions.mysql80)
"oracle" -> implementation("com.oracle.database.jdbc", "ojdbc8", Versions.oracle12)
"sqlserver" -> implementation("com.microsoft.sqlserver", "mssql-jdbc", Versions.sqlserver)
else -> {
implementation("com.h2database", "h2", Versions.h2)
implementation("mysql", "mysql-connector-java", Versions.mysql51)
implementation("org.postgresql", "postgresql", Versions.postgre)
implementation("com.impossibl.pgjdbc-ng", "pgjdbc-ng", Versions.postgreNG)
}
implementation("com.h2database", "h2", Versions.h2)

setupTestDriverDependencies(dialect) { group, artifactId, version ->
testImplementation(group, artifactId, version)
}
}

Expand Down

0 comments on commit c390ab0

Please sign in to comment.