Skip to content

Commit

Permalink
[hibernate#1540] Use latest stable version of the orm gradle plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
DavideD committed Mar 29, 2023
1 parent bfe1cf6 commit 2e6861e
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 16 deletions.
5 changes: 5 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,10 @@ ext {
if ( !project.hasProperty('hibernateOrmVersion') ) {
hibernateOrmVersion = '6.2.0.CR4'
}
if ( !project.hasProperty( 'hibernateOrmGradlePluginVersion' ) ) {
// Same as ORM as default
hibernateOrmGradlePluginVersion = project.hibernateOrmVersion
}
// For ORM, we need a parsed version (to get the family, ...)

// For ORM, we need a parsed version (to get the family for the documentation during release).
Expand Down Expand Up @@ -85,6 +89,7 @@ ext {
testcontainersVersion = '1.17.5'

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 "Hibernate Reactive: " + project.version
}
Expand Down
9 changes: 4 additions & 5 deletions examples/native-sql-example/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -27,24 +27,23 @@ dependencies {
buildscript {
repositories {
// Example: ./gradlew build -PenableMavenLocalRepo
if ( project.hasProperty('enableMavenLocalRepo') ) {
if ( project.hasProperty( 'enableMavenLocalRepo' ) ) {
// Useful for local development, it should be disabled otherwise
mavenLocal()
}
maven {
url = uri("https://plugins.gradle.org/m2/")
url 'https://plugins.gradle.org/m2/'
}

mavenCentral()

// Example: ./gradlew build -PenableJBossSnapshotsRep
if ( project.hasProperty('enableJBossSnapshotsRep') ) {
if ( project.hasProperty( 'enableJBossSnapshotsRep' ) ) {
// Used only for testing with the latest Hibernate ORM snapshots.
maven { url 'https://repository.jboss.org/nexus/content/repositories/snapshots' }
}
}
dependencies {
classpath "org.hibernate.orm:hibernate-gradle-plugin:${hibernateOrmVersion}"
classpath "org.hibernate.orm:hibernate-gradle-plugin:${hibernateOrmGradlePluginVersion}"
}
}

Expand Down
10 changes: 5 additions & 5 deletions examples/session-example/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -28,27 +28,27 @@ dependencies {
buildscript {
repositories {
// Example: ./gradlew build -PenableMavenLocalRepo
if ( project.hasProperty('enableMavenLocalRepo') ) {
if ( project.hasProperty( 'enableMavenLocalRepo' ) ) {
// Useful for local development, it should be disabled otherwise
mavenLocal()
}
maven {
url = uri("https://plugins.gradle.org/m2/")
url 'https://plugins.gradle.org/m2/'
}

mavenCentral()

// Example: ./gradlew build -PenableJBossSnapshotsRep
if ( project.hasProperty('enableJBossSnapshotsRep') ) {
if ( project.hasProperty( 'enableJBossSnapshotsRep' ) ) {
// Used only for testing with the latest Hibernate ORM snapshots.
maven { url 'https://repository.jboss.org/nexus/content/repositories/snapshots' }
}
}
dependencies {
classpath "org.hibernate.orm:hibernate-gradle-plugin:${hibernateOrmVersion}"
classpath "org.hibernate.orm:hibernate-gradle-plugin:${hibernateOrmGradlePluginVersion}"
}
}


// Hibernate Gradle plugin to enable bytecode enhancements
apply plugin: 'org.hibernate.orm'

Expand Down
7 changes: 6 additions & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,16 @@ enableSonatypeOpenSourceSnapshotsRep = true
#enableJBossSnapshotsRep = true

# Enable the maven local repository (for local development when needed) when present (value ignored)
enableMavenLocalRepo = true
#enableMavenLocalRepo = true

# Override default Hibernate ORM version
hibernateOrmVersion = 6.2.0-SNAPSHOT

# Override default Hibernate ORM Gradle plugin version
# Using the stable version because I don't know how to configure the build to download the snapshot version from
# a remote repository
hibernateOrmGradlePluginVersion = 6.2.0.CR4

# If set to true, skip Hibernate ORM version parsing (default is true, if set to null)
# this is required when using intervals or weird versions or the build will fail
#skipOrmVersionParsing = true
Expand Down
10 changes: 5 additions & 5 deletions integration-tests/bytecode-enhancements-it/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -30,27 +30,27 @@ dependencies {
buildscript {
repositories {
// Example: ./gradlew build -PenableMavenLocalRepo
if ( project.hasProperty('enableMavenLocalRepo') ) {
if ( project.hasProperty( 'enableMavenLocalRepo' ) ) {
// Useful for local development, it should be disabled otherwise
mavenLocal()
}
maven {
url = uri("https://plugins.gradle.org/m2/")
url 'https://plugins.gradle.org/m2/'
}

mavenCentral()

// Example: ./gradlew build -PenableJBossSnapshotsRep
if ( project.hasProperty('enableJBossSnapshotsRep') ) {
if ( project.hasProperty( 'enableJBossSnapshotsRep' ) ) {
// Used only for testing with the latest Hibernate ORM snapshots.
maven { url 'https://repository.jboss.org/nexus/content/repositories/snapshots' }
}
}
dependencies {
classpath "org.hibernate.orm:hibernate-gradle-plugin:${hibernateOrmVersion}"
classpath "org.hibernate.orm:hibernate-gradle-plugin:${hibernateOrmGradlePluginVersion}"
}
}


// Hibernate Gradle plugin to enable bytecode enhancements
apply plugin: 'org.hibernate.orm'

Expand Down

0 comments on commit 2e6861e

Please sign in to comment.