-
Notifications
You must be signed in to change notification settings - Fork 99
Migrate to Gradle version catalogs #2331
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
base: main
Are you sure you want to change the base?
Conversation
Thanks, I will have a look at this soon |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks a lot, looks great!
But I think something got lost in the changes.
When I run a test in the main branch, it prints:
> Configure project :
Project version: 4.0.0-SNAPSHOT (4.0)
Release version: n/a
Development version: n/a
ORM version: 7.0.2.Final
ORM Gradle plugin version: 7.0.2.Final
Vert.x SQL Client Version: 5.0.0
But after your changes, I see:
> Configure project :
Project version: 4.0.0-SNAPSHOT (4.0)
Release version: n/a
Development version: n/a
This information is quite because we tend to run Hibernate Reactive with different configurations.
Also, very nitpicky, but could you also add the issue number before the commit message? It makes my life easier when I need to track down changes.
I usually add it like this:
[#2331] Migrate to Gradle version catalogs
@sebersole Could you also have a look if this is what you had in mind when you created the issue? The approach looks good to me overall, but I don't have a lot of experience with catalogs.
Thanks a lot exoego!
|
||
# 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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't see this property mentioned anywhere anymore
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it still needed?
IIUC, if skipOrmVersionParsing
is false, hibernateOrmVersion
is parsed and may raise if version has no .
in it.
hibernate-reactive/local-build-plugins/src/main/java/org/hibernate/reactive/env/ProjectVersion.java
Lines 17 to 24 in c254ebb
try { | |
final String[] hibernateVersionComponents = fullName.split( "\\." ); | |
major = hibernateVersionComponents[0]; | |
minor = hibernateVersionComponents[1]; | |
} | |
catch (Exception e) { | |
throw new IllegalArgumentException( "Invalid version number: " + fullName + "." ); | |
} |
When one wants to test "weird versions", why not simply use that version ? 🤔
❯ ./gradlew compileJava -PhibernateOrmVersion=1234weiredversion
|
||
# Override default Vert.x Web client and server versions. For integration tests, both default to vertxSqlClientVersion | ||
#vertxWebVersion = 5.0.0 | ||
#vertxWebtClientVersion = 5.0.0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's quite helpful to have all these properties in one place, will they still work if we keep them here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
will they still work if we keep them here?
No, keeping versions in gradle.properties
does not make sense, since there is no way to refer these gradle properties within libs.versions.toml
.
All versions are now managed in one place, version catalog gradle/libs.versions.toml
.
Please refer [versions]
section in the catalog.
The section defines version variables like before in gradle.properties
.
I see.
If no override, it shows default versions defined in I initially thought it should be implemented near the place where version override is implemented. |
Closes #1989
Mostly auto-transformed by gradle-version-catalog-cli which I wrote.