diff --git a/build.gradle b/build.gradle index a16d3d0ab..37a35443f 100644 --- a/build.gradle +++ b/build.gradle @@ -81,16 +81,16 @@ ext { // Mainly, to allow CI to test the latest versions of Vert.X // Example: - // ./gradlew build -PvertxVersion=4.0.0-SNAPSHOT - if ( !project.hasProperty('vertxVersion') ) { - vertxVersion = '4.4.4' + // ./gradlew build -PvertxSqlClientVersion=4.0.0-SNAPSHOT + if ( !project.hasProperty( 'vertxSqlClientVersion' ) ) { + vertxSqlClientVersion = '4.4.4' } testcontainersVersion = '1.18.3' logger.lifecycle "Hibernate ORM Version: " + project.hibernateOrmVersion logger.lifecycle "Hibernate ORM Gradle plugin Version: " + project.hibernateOrmGradlePluginVersion - logger.lifecycle "Vert.x Version: " + project.vertxVersion + logger.lifecycle "Vert.x SQL Client Version: " + project.vertxSqlClientVersion logger.lifecycle "Hibernate Reactive: " + project.version } diff --git a/documentation/src/main/asciidoc/reference/introduction.adoc b/documentation/src/main/asciidoc/reference/introduction.adoc index 2d6c43682..ef9a23143 100644 --- a/documentation/src/main/asciidoc/reference/introduction.adoc +++ b/documentation/src/main/asciidoc/reference/introduction.adoc @@ -62,14 +62,14 @@ driver for your database, one of the following options: |=== | Database | Driver dependency -| PostgreSQL or CockroachDB | `io.vertx:vertx-pg-client:{vertxVersion}` -| MySQL or MariaDB | `io.vertx:vertx-mysql-client:{vertxVersion}` -| DB2 | `io.vertx:vertx-db2-client:{vertxVersion}` -| SQL Server | `io.vertx:vertx-mssql-client:${vertxVersion}` -| Oracle | `io.vertx:vertx-oracle-client:${vertxVersion}` +| PostgreSQL or CockroachDB | `io.vertx:vertx-pg-client:{vertxSqlClientVersion}` +| MySQL or MariaDB | `io.vertx:vertx-mysql-client:{vertxSqlClientVersion}` +| DB2 | `io.vertx:vertx-db2-client:{vertxSqlClientVersion}` +| SQL Server | `io.vertx:vertx-mssql-client:${vertxSqlClientVersion}` +| Oracle | `io.vertx:vertx-oracle-client:${vertxSqlClientVersion}` |=== -Where `{vertxVersion}` is the version of Vert.x compatible with the +Where `{vertxSqlClientVersion}` is the version of Vert.x compatible with the version of Hibernate Reactive you're using. You don't need to depend on the JDBC driver for your database. diff --git a/examples/native-sql-example/build.gradle b/examples/native-sql-example/build.gradle index 76b77e084..2d6cd5b94 100644 --- a/examples/native-sql-example/build.gradle +++ b/examples/native-sql-example/build.gradle @@ -29,7 +29,7 @@ dependencies { annotationProcessor "org.hibernate.orm:hibernate-jpamodelgen:${hibernateOrmVersion}" // database driver for PostgreSQL - runtimeOnly "io.vertx:vertx-pg-client:${vertxVersion}" + runtimeOnly "io.vertx:vertx-pg-client:${vertxSqlClientVersion}" // logging (optional) runtimeOnly "org.apache.logging.log4j:log4j-core:2.20.0" diff --git a/examples/session-example/build.gradle b/examples/session-example/build.gradle index 04d1f29bf..05e9dcc04 100644 --- a/examples/session-example/build.gradle +++ b/examples/session-example/build.gradle @@ -29,8 +29,8 @@ dependencies { annotationProcessor "org.hibernate.orm:hibernate-jpamodelgen:${hibernateOrmVersion}" // database drivers for PostgreSQL and MySQL - runtimeOnly "io.vertx:vertx-pg-client:${vertxVersion}" - runtimeOnly "io.vertx:vertx-mysql-client:${vertxVersion}" + runtimeOnly "io.vertx:vertx-pg-client:${vertxSqlClientVersion}" + runtimeOnly "io.vertx:vertx-mysql-client:${vertxSqlClientVersion}" // logging (optional) runtimeOnly "org.apache.logging.log4j:log4j-core:2.20.0" diff --git a/gradle.properties b/gradle.properties index 6f857b6bd..4acfdfc65 100644 --- a/gradle.properties +++ b/gradle.properties @@ -46,5 +46,10 @@ org.gradle.java.installations.auto-download=false # this is required when using intervals or weird versions or the build will fail #skipOrmVersionParsing = true -# Override default Vert.x version -#vertxVersion = 4.4.4-SNAPSHOT +# Override default Vert.x Sql client version +#vertxSqlClientVersion = 4.4.4-SNAPSHOT + +# Override default Vert.x Web client and server versions. For integration tests, both default to vertxSqlClientVersion +#vertxWebVersion = 4.4.4 +#vertxWebtClientVersion = 4.4.4 + diff --git a/hibernate-reactive-core/build.gradle b/hibernate-reactive-core/build.gradle index 45ee40459..97088a502 100644 --- a/hibernate-reactive-core/build.gradle +++ b/hibernate-reactive-core/build.gradle @@ -21,18 +21,18 @@ dependencies { annotationProcessor 'org.jboss.logging:jboss-logging-processor:2.2.1.Final' //Specific implementation details of Hibernate Reactive: - implementation "io.vertx:vertx-sql-client:${vertxVersion}" + implementation "io.vertx:vertx-sql-client:${vertxSqlClientVersion}" // Testing testImplementation 'org.assertj:assertj-core:3.24.2' - testImplementation "io.vertx:vertx-junit5:${vertxVersion}" + testImplementation "io.vertx:vertx-junit5:${vertxSqlClientVersion}" // Drivers - testImplementation "io.vertx:vertx-pg-client:${vertxVersion}" - testImplementation "io.vertx:vertx-mysql-client:${vertxVersion}" - testImplementation "io.vertx:vertx-db2-client:${vertxVersion}" - testImplementation "io.vertx:vertx-mssql-client:${vertxVersion}" - testImplementation "io.vertx:vertx-oracle-client:${vertxVersion}" + testImplementation "io.vertx:vertx-pg-client:${vertxSqlClientVersion}" + testImplementation "io.vertx:vertx-mysql-client:${vertxSqlClientVersion}" + testImplementation "io.vertx:vertx-db2-client:${vertxSqlClientVersion}" + testImplementation "io.vertx:vertx-mssql-client:${vertxSqlClientVersion}" + testImplementation "io.vertx:vertx-oracle-client:${vertxSqlClientVersion}" // Optional dependency of vertx-pg-client, essential when connecting via SASL SCRAM testImplementation 'com.ongres.scram:client:2.1' diff --git a/integration-tests/bytecode-enhancements-it/build.gradle b/integration-tests/bytecode-enhancements-it/build.gradle index 799ac8d11..02af83ce0 100644 --- a/integration-tests/bytecode-enhancements-it/build.gradle +++ b/integration-tests/bytecode-enhancements-it/build.gradle @@ -27,7 +27,7 @@ dependencies { annotationProcessor "org.hibernate.orm:hibernate-jpamodelgen:${hibernateOrmVersion}" // Testing on one database should be enough - runtimeOnly "io.vertx:vertx-pg-client:${vertxVersion}" + runtimeOnly "io.vertx:vertx-pg-client:${vertxSqlClientVersion}" // Allow authentication to PostgreSQL using SCRAM: runtimeOnly 'com.ongres.scram:client:2.1' @@ -40,7 +40,7 @@ dependencies { // Testing testImplementation "org.assertj:assertj-core:${assertjVersion}" - testImplementation "io.vertx:vertx-junit5:${vertxVersion}" + testImplementation "io.vertx:vertx-junit5:${vertxSqlClientVersion}" } // Optional: enable the bytecode enhancements diff --git a/integration-tests/techempower-postgres-it/build.gradle b/integration-tests/techempower-postgres-it/build.gradle index d932944f7..dea13751e 100644 --- a/integration-tests/techempower-postgres-it/build.gradle +++ b/integration-tests/techempower-postgres-it/build.gradle @@ -15,14 +15,20 @@ ext { jacksonDatabindVersion = '2.15.2' jbossLoggingVersion = '3.5.0.Final' assertjVersion = '3.24.2' + vertxWebVersion = project.hasProperty( 'vertxWebVersion' ) + ? project.property( 'vertxWebVersion' ) + : vertxSqlClientVersion + vertxWebClientVersion = project.hasProperty( 'vertxWebClientVersion' ) + ? project.property( 'vertxWebClientVersion' ) + : vertxSqlClientVersion } dependencies { implementation project( ':hibernate-reactive-core' ) - implementation "io.vertx:vertx-web:${vertxVersion}" - implementation "io.vertx:vertx-web-client:${vertxVersion}" + implementation "io.vertx:vertx-web:${vertxWebVersion}" + implementation "io.vertx:vertx-web-client:${vertxWebClientVersion}" - runtimeOnly "io.vertx:vertx-pg-client:${vertxVersion}" + runtimeOnly "io.vertx:vertx-pg-client:${vertxSqlClientVersion}" // The Pg client requires this dependency runtimeOnly "com.ongres.scram:client:2.1" runtimeOnly "com.fasterxml.jackson.core:jackson-databind:${jacksonDatabindVersion}" @@ -35,7 +41,7 @@ dependencies { // Testing testImplementation "org.assertj:assertj-core:${assertjVersion}" - testImplementation "io.vertx:vertx-junit5:${vertxVersion}" + testImplementation "io.vertx:vertx-junit5:${vertxSqlClientVersion}" } // Configuration for the tests @@ -55,12 +61,12 @@ tasks.withType( Test ).configureEach { systemProperty 'docker', project.properties['docker'] ?: true systemProperty 'org.hibernate.reactive.common.InternalStateAssertions.ENFORCE', 'true' - if ( project.hasProperty( 'includeTests' ) ) { - // Example: ./gradlew testAll -PincludeTests=DefaultPortTest - filter { + if ( project.hasProperty( 'includeTests' ) ) { + // Example: ./gradlew testAll -PincludeTests=DefaultPortTest + filter { includeTestsMatching project.properties['includeTests'] ?: '*' as String } - } + } } // Print a summary of the results of the tests (number of failures, successes and skipped) @@ -93,7 +99,7 @@ jar { attributes 'Implementation-Version': project.version } from { - configurations.runtimeClasspath.collect { it.isDirectory() ? it : zipTree(it) } + configurations.runtimeClasspath.collect { it.isDirectory() ? it : zipTree( it ) } } } diff --git a/integration-tests/verticle-postgres-it/build.gradle b/integration-tests/verticle-postgres-it/build.gradle index c557beeff..6b1e991d1 100644 --- a/integration-tests/verticle-postgres-it/build.gradle +++ b/integration-tests/verticle-postgres-it/build.gradle @@ -15,14 +15,20 @@ ext { jacksonDatabindVersion = '2.15.2' jbossLoggingVersion = '3.5.0.Final' assertjVersion = '3.24.2' + vertxWebVersion = project.hasProperty( 'vertxWebVersion' ) + ? project.property( 'vertxWebVersion' ) + : vertxSqlClientVersion + vertxWebClientVersion = project.hasProperty( 'vertxWebClientVersion' ) + ? project.property( 'vertxWebClientVersion' ) + : vertxSqlClientVersion } dependencies { implementation project(':hibernate-reactive-core') - implementation "io.vertx:vertx-web:${vertxVersion}" - implementation "io.vertx:vertx-web-client:${vertxVersion}" + implementation "io.vertx:vertx-web:${vertxWebVersion}" + implementation "io.vertx:vertx-web-client:${vertxWebClientVersion}" - runtimeOnly "io.vertx:vertx-pg-client:${vertxVersion}" + runtimeOnly "io.vertx:vertx-pg-client:${vertxSqlClientVersion}" // The Pg client requires this dependency runtimeOnly "com.ongres.scram:client:2.1" runtimeOnly "com.fasterxml.jackson.core:jackson-databind:${jacksonDatabindVersion}" @@ -35,7 +41,7 @@ dependencies { // Testing testImplementation "org.assertj:assertj-core:${assertjVersion}" - testImplementation "io.vertx:vertx-junit5:${vertxVersion}" + testImplementation "io.vertx:vertx-junit5:${vertxSqlClientVersion}" } // Configuration for the tests