{"id":23543265,"url":"https://github.com/orchestr7/vercraft","last_synced_at":"2026-04-02T00:01:54.258Z","repository":{"id":268163547,"uuid":"839004022","full_name":"orchestr7/vercraft","owner":"orchestr7","description":"A simple tool for versioning your JVM app which calculates the version of the commit in SemVer format","archived":false,"fork":false,"pushed_at":"2026-03-22T22:46:04.000Z","size":7015,"stargazers_count":44,"open_issues_count":20,"forks_count":5,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-03-23T14:10:02.868Z","etag":null,"topics":["git","github-actions","gradle","jvm","versioning"],"latest_commit_sha":null,"homepage":"","language":"Kotlin","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/orchestr7.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2024-08-06T19:15:41.000Z","updated_at":"2026-03-22T21:22:13.000Z","dependencies_parsed_at":"2026-02-03T01:04:39.390Z","dependency_job_id":null,"html_url":"https://github.com/orchestr7/vercraft","commit_stats":null,"previous_names":["orchestr7/vercraft"],"tags_count":10,"template":false,"template_full_name":null,"purl":"pkg:github/orchestr7/vercraft","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/orchestr7%2Fvercraft","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/orchestr7%2Fvercraft/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/orchestr7%2Fvercraft/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/orchestr7%2Fvercraft/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/orchestr7","download_url":"https://codeload.github.com/orchestr7/vercraft/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/orchestr7%2Fvercraft/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31293139,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-01T21:15:39.731Z","status":"ssl_error","status_checked_at":"2026-04-01T21:15:34.046Z","response_time":53,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["git","github-actions","gradle","jvm","versioning"],"created_at":"2024-12-26T06:26:39.410Z","updated_at":"2026-04-02T00:01:54.004Z","avatar_url":"https://github.com/orchestr7.png","language":"Kotlin","funding_links":[],"categories":[],"sub_categories":[],"readme":"![logo.png](docs/logo.png)\n\n### A simple tool for versioning your JVM app\n\nVerCraft is a [yet another](#why-choose-vercraft) plugin, which **calculates** the current version in SemVer format based on the checked-out commit and applies it to \nbuild tools and release plugins. It also **makes release preparations** by calculating the next version for the upcoming release, \ncreating a new release branch, and tagging the commit with the generated version to reduce manual release work.\n\n## Contribution and Acknowledgement\nWe will be glad if you will test `VerCraft` or contribute to this project.\nIn case you don't have much time for this - at least spend 5 seconds to give us a star to attract other contributors! \n**Thanks!** :partying_face: Special thanks to those awesome developers who has given great suggestions for this project: \n[@nulls](https://github.com/nulls), [@semyon-zvyagin](https://github.com/semyon-zvyagin)\n\n## Quick start\nNo boring configuration, add the following plugin to your **parent** build.gradle(kts):\n```kotlin\npluginManagement {\n    repositories {\n        // Vercraft plugin is hosted on Maven Central\n        mavenCentral()\n    }\n}\n\nplugins {\n    // when this plugin is applied to parent project, it will automatically calculate and set the version of the project\n    id(\"com.akuleshov7.vercraft.plugin-gradle\") version(\"0.5.0\")\n}\n\n// (!) Note: If the plugin runs successfully, you will see a log message like this: `\u003e\u003e VerCrafted: 0.0.1`.\n```\n\nTo create local release tag, local release branch, calculate and return version, run:\n```bash\n# to create a release branch with a newly calculated MAJOR version\n./gradlew makeRelease -PreleaseType=MAJOR\n\n# to create a release branch with a newly calculated MINOR version\n./gradlew makeRelease -PreleaseType=MINOR\n\n# to find latest release branch and mark latest commit with PATCH version\n./gradlew makeRelease -PreleaseType=PATCH\n\n# (!) Note: `makeRelease` task also pushes release tag and branch to remote git hosting.\n```\n\n(Optional) For manual calculation of the version for current checked-out commit, run:\n```bash\n# this is already done automatically for all projects by plugin,\n# but in case you need to do some manual calculations:\n./gradlew gitVersion\n```\n\n## Vercraft in CI\n\n**(!) Important:** Vercraft uses branches and git history for the calculation of version. \nSo for a proper work, you need to do the following setup:\n\n✅ Github: set fetch-depth: 0 in checkout action \\\n✅ Gitlab: set GIT_DEPTH: 0 in your particular job \n\nAll modern CI platforms check out a specific commit to execute their actions. \nThis places the repository in a “detached HEAD” state, meaning Vercraft cannot automatically determine the current branch \nyou’re working with.\n\nHowever, CI platforms from major Git hosting providers propagate the original branch name used in MRs/PRs, \nor as the trigger for a CI action. They achieve this using special environment variables, which Vercraft automatically \ndetects and utilizes:\n\n✅ GitHub: GITHUB_HEAD_REF \\\n✅ GitLab: CI_COMMIT_REF_NAME \\\n✅ Bitbucket: BITBUCKET_BRANCH\n\n💡For other CI platforms, please ensure you **manually set** the VERCRAFT_BRANCH environment variable.\n\n## Supported Build Tools\n✅ **Gradle** \\\n🚧 **Maven** (coming soon)\n\n## How it works\nVerCraft automatically calculates the version for your currently checked-out ref (commit or branch). \nIt determines the version based solely on two factors: the currently checked-out branch and release branches \n(branches with the release/ prefix) present in your project’s Git log.\n\nIf you’re on the main branch, VerCraft identifies the base commit in main that was used to create the latest release branch. \nIt then calculates the distance (in commits) from that base commit to your current commit to determine the version.\n\nThe same logic applies to commits in release branches. VerCraft locates the first commit in the release branch and calculates the \ndistance from that point to the current commit to generate the version.\n\nThe only requirement VerCraft imposes is the use of `release/` branches in your delivery process. \nNo need for extra tags on every commit or any redundant steps - just clean and efficient version management.\n\n(!) Important: `release/` branches are actively used in Vercraft to calculate versions, so you **should not** delete them \n(at least latest one) from your repository's git log.\n\n![docs/gitVersion.png](docs/gitVersion.png)\n\n![docs/makeRelease.png](docs/makeRelease.png)\n\n## Why Choose VerCraft\nThere are already several great tools like `gradle-plugin-versionest`, `reckon`, `JGitver`, and `nebula-release-plugin` \nthat calculate project versions based on the current commit and branch. \nMost of these tools rely on tags and offer extensive configurability. **However...**\n\nIn practice, these tools often introduce complex configurations without enforcing \na structured Git workflow—something essential in 80% of enterprise development environments. \nAlso other tools are also more useful for a lightweight [Github](https://docs.github.com/en/get-started/using-github/github-flow) flow.\n\nVerCraft takes a different approach:\n- **Simplicity over complexity** – Versioning and releasing pipeline based on release branches\nis streamlined, familiar to most of the developers in enterprise and easy to adopt.\n- **Structured workflow** – VerCraft encourages a straightforward, Git-driven approach to versioning with \nrelease branches, more similar to Gitlab-flow.\n\nUnlike other tools, VerCraft doesn't treat Git tags as a database for previous releases. \nInstead, it uses **release branches** and some extra heuristics, ensuring that your repository \nremains clean and release processes are strict. \nOnly necessary release tags and branches are created — unnecessary \"tag zoo\" is not made.\n\n## Local Development\nRun the following commands for local builds or to publish to your local Maven repository:\n```bash\n./gradlew build\n./gradlew publishToMavenLocal\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Forchestr7%2Fvercraft","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Forchestr7%2Fvercraft","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Forchestr7%2Fvercraft/lists"}