Skip to content

Commit 2e6861e

Browse files
committed
[#1540] Use latest stable version of the orm gradle plugin
1 parent bfe1cf6 commit 2e6861e

File tree

5 files changed

+25
-16
lines changed

5 files changed

+25
-16
lines changed

build.gradle

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,10 @@ ext {
5555
if ( !project.hasProperty('hibernateOrmVersion') ) {
5656
hibernateOrmVersion = '6.2.0.CR4'
5757
}
58+
if ( !project.hasProperty( 'hibernateOrmGradlePluginVersion' ) ) {
59+
// Same as ORM as default
60+
hibernateOrmGradlePluginVersion = project.hibernateOrmVersion
61+
}
5862
// For ORM, we need a parsed version (to get the family, ...)
5963

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

8791
logger.lifecycle "Hibernate ORM Version: " + project.hibernateOrmVersion
92+
logger.lifecycle "Hibernate ORM Gradle plugin Version: " + project.hibernateOrmGradlePluginVersion
8893
logger.lifecycle "Vert.x Version: " + project.vertxVersion
8994
logger.lifecycle "Hibernate Reactive: " + project.version
9095
}

examples/native-sql-example/build.gradle

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,24 +27,23 @@ dependencies {
2727
buildscript {
2828
repositories {
2929
// Example: ./gradlew build -PenableMavenLocalRepo
30-
if ( project.hasProperty('enableMavenLocalRepo') ) {
30+
if ( project.hasProperty( 'enableMavenLocalRepo' ) ) {
3131
// Useful for local development, it should be disabled otherwise
3232
mavenLocal()
3333
}
3434
maven {
35-
url = uri("https://plugins.gradle.org/m2/")
35+
url 'https://plugins.gradle.org/m2/'
3636
}
37-
3837
mavenCentral()
3938

4039
// Example: ./gradlew build -PenableJBossSnapshotsRep
41-
if ( project.hasProperty('enableJBossSnapshotsRep') ) {
40+
if ( project.hasProperty( 'enableJBossSnapshotsRep' ) ) {
4241
// Used only for testing with the latest Hibernate ORM snapshots.
4342
maven { url 'https://repository.jboss.org/nexus/content/repositories/snapshots' }
4443
}
4544
}
4645
dependencies {
47-
classpath "org.hibernate.orm:hibernate-gradle-plugin:${hibernateOrmVersion}"
46+
classpath "org.hibernate.orm:hibernate-gradle-plugin:${hibernateOrmGradlePluginVersion}"
4847
}
4948
}
5049

examples/session-example/build.gradle

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,27 +28,27 @@ dependencies {
2828
buildscript {
2929
repositories {
3030
// Example: ./gradlew build -PenableMavenLocalRepo
31-
if ( project.hasProperty('enableMavenLocalRepo') ) {
31+
if ( project.hasProperty( 'enableMavenLocalRepo' ) ) {
3232
// Useful for local development, it should be disabled otherwise
3333
mavenLocal()
3434
}
3535
maven {
36-
url = uri("https://plugins.gradle.org/m2/")
36+
url 'https://plugins.gradle.org/m2/'
3737
}
38-
3938
mavenCentral()
4039

4140
// Example: ./gradlew build -PenableJBossSnapshotsRep
42-
if ( project.hasProperty('enableJBossSnapshotsRep') ) {
41+
if ( project.hasProperty( 'enableJBossSnapshotsRep' ) ) {
4342
// Used only for testing with the latest Hibernate ORM snapshots.
4443
maven { url 'https://repository.jboss.org/nexus/content/repositories/snapshots' }
4544
}
4645
}
4746
dependencies {
48-
classpath "org.hibernate.orm:hibernate-gradle-plugin:${hibernateOrmVersion}"
47+
classpath "org.hibernate.orm:hibernate-gradle-plugin:${hibernateOrmGradlePluginVersion}"
4948
}
5049
}
5150

51+
5252
// Hibernate Gradle plugin to enable bytecode enhancements
5353
apply plugin: 'org.hibernate.orm'
5454

gradle.properties

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,11 +35,16 @@ enableSonatypeOpenSourceSnapshotsRep = true
3535
#enableJBossSnapshotsRep = true
3636

3737
# Enable the maven local repository (for local development when needed) when present (value ignored)
38-
enableMavenLocalRepo = true
38+
#enableMavenLocalRepo = true
3939

4040
# Override default Hibernate ORM version
4141
hibernateOrmVersion = 6.2.0-SNAPSHOT
4242

43+
# Override default Hibernate ORM Gradle plugin version
44+
# Using the stable version because I don't know how to configure the build to download the snapshot version from
45+
# a remote repository
46+
hibernateOrmGradlePluginVersion = 6.2.0.CR4
47+
4348
# If set to true, skip Hibernate ORM version parsing (default is true, if set to null)
4449
# this is required when using intervals or weird versions or the build will fail
4550
#skipOrmVersionParsing = true

integration-tests/bytecode-enhancements-it/build.gradle

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,27 +30,27 @@ dependencies {
3030
buildscript {
3131
repositories {
3232
// Example: ./gradlew build -PenableMavenLocalRepo
33-
if ( project.hasProperty('enableMavenLocalRepo') ) {
33+
if ( project.hasProperty( 'enableMavenLocalRepo' ) ) {
3434
// Useful for local development, it should be disabled otherwise
3535
mavenLocal()
3636
}
3737
maven {
38-
url = uri("https://plugins.gradle.org/m2/")
38+
url 'https://plugins.gradle.org/m2/'
3939
}
40-
4140
mavenCentral()
4241

4342
// Example: ./gradlew build -PenableJBossSnapshotsRep
44-
if ( project.hasProperty('enableJBossSnapshotsRep') ) {
43+
if ( project.hasProperty( 'enableJBossSnapshotsRep' ) ) {
4544
// Used only for testing with the latest Hibernate ORM snapshots.
4645
maven { url 'https://repository.jboss.org/nexus/content/repositories/snapshots' }
4746
}
4847
}
4948
dependencies {
50-
classpath "org.hibernate.orm:hibernate-gradle-plugin:${hibernateOrmVersion}"
49+
classpath "org.hibernate.orm:hibernate-gradle-plugin:${hibernateOrmGradlePluginVersion}"
5150
}
5251
}
5352

53+
5454
// Hibernate Gradle plugin to enable bytecode enhancements
5555
apply plugin: 'org.hibernate.orm'
5656

0 commit comments

Comments
 (0)