Skip to content

Minor changes to the build file to simplify snapshot testing #1699

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jul 7, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down
12 changes: 6 additions & 6 deletions documentation/src/main/asciidoc/reference/introduction.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion examples/native-sql-example/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
4 changes: 2 additions & 2 deletions examples/session-example/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
9 changes: 7 additions & 2 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -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

14 changes: 7 additions & 7 deletions hibernate-reactive-core/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down
4 changes: 2 additions & 2 deletions integration-tests/bytecode-enhancements-it/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand All @@ -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
Expand Down
24 changes: 15 additions & 9 deletions integration-tests/techempower-postgres-it/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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}"
Expand All @@ -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
Expand All @@ -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)
Expand Down Expand Up @@ -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 ) }
}
}

Expand Down
14 changes: 10 additions & 4 deletions integration-tests/verticle-postgres-it/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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}"
Expand All @@ -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
Expand Down