Skip to content

Git Version Plugin

Gradle Kotlin License: MIT

A lightweight Gradle plugin that automatically generates code and name directly from your Git history.
Perfect for Android projects and any build setup where you want Git-driven versioning.

Features

  • code → Derived from the total number of Git commits (git rev-list --count HEAD).
  • name → Dynamically generated (based on tags or commit count).
  • multiplier → Optional multiplier for code.
  • versionName → Optional manual override of name.
  • Zero config → Just apply the plugin and use the values.
  • Safe defaults → Falls back gracefully if Git is not available.
  • Built-in task → Built-in task to print version info

Latest Release

Version → 1.0.2

For more details, refer to plugins.gradle.org/git-version

If you like this plugin, don’t forget to star the repo!

GitHub