Automating Kafka `version` property update process in code repository

Not sure if appropriate to ask here…but I imagine somewhere in the Kafka code there is a version property that lets the clients and the servers keep track of their version. Is that updated manually on each release, or is it automated somehow? I think the fact that we have to do PR’s like this on our project is a big Code Smell…so I’d be open to tips on how to automate:

There’s a version in our but:

  1. Not sure how to access that in our Java code
  2. Definitely not sure how to access that in our Go CLI code

Yes, this is happening automatically with Kafka.


It’s still few places where we need to update the version…

But in the end, it’s picked up, and we add a properties files that we put into the jar, and this properties file is read on startup to read the version.

Ah, putting a properties file in the jar is a good idea. Thanks!


We also encode the commit hash in this file.


I am not a gradle person, but the magic happens somewhere there