Skip to content

[3.0] Rename property for enabling snapshot repositories #2336

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 2 commits into from
Jul 8, 2025
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
33 changes: 33 additions & 0 deletions examples/native-sql-example/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -75,3 +75,36 @@ tasks.register( "runAllExamples" ) {
dependsOn = ["runAllExamplesOnPostgreSQL"]
description = "Run all examples on ${dbs}"
}

// Optional: Task to print the resolved versions of Hibernate ORM and Vert.x
tasks.register( "printResolvedVersions" ) {
description = "Print the resolved hibernate-orm-core and vert.x versions"
doLast {
def hibernateCoreVersion = "n/a"
def vertxVersion = "n/a"

// Resolve Hibernate Core and Vert.x versions from compile classpath
configurations.compileClasspath.resolvedConfiguration.resolvedArtifacts.each { artifact ->
if (artifact.moduleVersion.id.name == 'hibernate-core') {
hibernateCoreVersion = artifact.moduleVersion.id.version
}
if (artifact.moduleVersion.id.group == 'io.vertx' && artifact.moduleVersion.id.name == 'vertx-sql-client') {
vertxVersion = artifact.moduleVersion.id.version
}
}

// Print the resolved versions
println "Resolved Hibernate ORM Core Version: ${hibernateCoreVersion}"
println "Resolved Vert.x SQL client Version: ${vertxVersion}"
}
}

// Make the version printing task run before tests and JavaExec tasks
tasks.withType( Test ).configureEach {
dependsOn printResolvedVersions
}

tasks.withType( JavaExec ).configureEach {
dependsOn printResolvedVersions
}

32 changes: 32 additions & 0 deletions examples/session-example/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -81,3 +81,35 @@ tasks.register( "runAllExamples" ) {
dependsOn = ["runAllExamplesOnPostgreSQL", "runAllExamplesOnMySQL"]
description = "Run all examples on ${dbs}"
}

// Optional: Task to print the resolved versions of Hibernate ORM and Vert.x
tasks.register( "printResolvedVersions" ) {
description = "Print the resolved hibernate-orm-core and vert.x versions"
doLast {
def hibernateCoreVersion = "n/a"
def vertxVersion = "n/a"

// Resolve Hibernate Core and Vert.x versions from compile classpath
configurations.compileClasspath.resolvedConfiguration.resolvedArtifacts.each { artifact ->
if (artifact.moduleVersion.id.name == 'hibernate-core') {
hibernateCoreVersion = artifact.moduleVersion.id.version
}
if (artifact.moduleVersion.id.group == 'io.vertx' && artifact.moduleVersion.id.name == 'vertx-sql-client') {
vertxVersion = artifact.moduleVersion.id.version
}
}

// Print the resolved versions
println "Resolved Hibernate ORM Core Version: ${hibernateCoreVersion}"
println "Resolved Vert.x SQL client Version: ${vertxVersion}"
}
}

// Make the version printing task run before tests and JavaExec tasks
tasks.withType( Test ).configureEach {
dependsOn printResolvedVersions
}

tasks.withType( JavaExec ).configureEach {
dependsOn printResolvedVersions
}
4 changes: 2 additions & 2 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ org.gradle.java.installations.auto-download=false
# Db2, MySql, PostgreSQL, CockroachDB, SqlServer, Oracle
#db = MSSQL

# Enable the SonatypeOS maven repository (mainly for Vert.x snapshots) when present (value ignored)
#enableSonatypeOpenSourceSnapshotsRep = true
# Enable the maven Central Snapshot repository, when set to any value (the value is ignored)
#enableCentralSonatypeSnapshotsRep = true

# Enable the maven local repository (for local development when needed) when present (value ignored)
#enableMavenLocalRepo = true
Expand Down
32 changes: 32 additions & 0 deletions hibernate-reactive-core/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -167,3 +167,35 @@ tasks.register( "testAll", Test ) {
description = "Run tests for ${dbs}"
dependsOn = dbs.collect( [] as HashSet ) { db -> "testDb${db}" }
}

// Task to print the resolved versions of Hibernate ORM and Vert.x
tasks.register( "printResolvedVersions" ) {
description = "Print the resolved hibernate-orm-core and vert.x versions"
doLast {
def hibernateCoreVersion = "n/a"
def vertxVersion = "n/a"

// Resolve Hibernate Core and Vert.x versions from compile classpath
configurations.compileClasspath.resolvedConfiguration.resolvedArtifacts.each { artifact ->
if (artifact.moduleVersion.id.name == 'hibernate-core') {
hibernateCoreVersion = artifact.moduleVersion.id.version
}
if (artifact.moduleVersion.id.group == 'io.vertx' && artifact.moduleVersion.id.name == 'vertx-sql-client') {
vertxVersion = artifact.moduleVersion.id.version
}
}

// Print the resolved versions
println "Resolved Hibernate ORM Core Version: ${hibernateCoreVersion}"
println "Resolved Vert.x SQL client Version: ${vertxVersion}"
}
}

// Make the version printing task run before tests and JavaExec tasks
tasks.withType( Test ).configureEach {
dependsOn printResolvedVersions
}

tasks.withType( JavaExec ).configureEach {
dependsOn printResolvedVersions
}
Loading