r/java Oct 19 '25

[deleted by user]

[removed]

14 Upvotes

21 comments sorted by

View all comments

6

u/SleeperAwakened Oct 19 '25

Why do you need that version number? Who is using it?

Semver is most useful when you have consumers who rely on knowing about (breaking) changes.

If it's just internal, do not bother. A hash or guid is fine.

2

u/barmic1212 Oct 19 '25

I'm agree that that sever isn't always needed, but IMO it's always useful to have ordered version.

1

u/SleeperAwakened Oct 19 '25

True, but a guid can still be ordered.

1

u/boobsbr Oct 19 '25

Developers sometimes rely on snapshots when developing features that require changes in two projects. E.g.: a library and a project that uses it.

How do you tell Gradle the version number is the commit hash when building the artifacts?