{"id":15674616,"url":"https://github.com/supercilex/version-orchestrator","last_synced_at":"2025-05-06T23:23:27.422Z","repository":{"id":39676291,"uuid":"241978640","full_name":"SUPERCILEX/version-orchestrator","owner":"SUPERCILEX","description":"Version Orchestrator provides an effortless and performant way to automate versioning your Android app.","archived":false,"fork":false,"pushed_at":"2022-05-27T19:03:24.000Z","size":160,"stargazers_count":16,"open_issues_count":0,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-31T03:51:43.251Z","etag":null,"topics":["android","android-development","apps","automation","deployment","git","gradle-plugin","mobile","version-manager","versioning"],"latest_commit_sha":null,"homepage":"","language":"Kotlin","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/SUPERCILEX.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null},"funding":{"github":"SUPERCILEX"}},"created_at":"2020-02-20T20:06:52.000Z","updated_at":"2024-07-27T00:46:34.000Z","dependencies_parsed_at":"2022-08-28T06:43:50.827Z","dependency_job_id":null,"html_url":"https://github.com/SUPERCILEX/version-orchestrator","commit_stats":null,"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SUPERCILEX%2Fversion-orchestrator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SUPERCILEX%2Fversion-orchestrator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SUPERCILEX%2Fversion-orchestrator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SUPERCILEX%2Fversion-orchestrator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/SUPERCILEX","download_url":"https://codeload.github.com/SUPERCILEX/version-orchestrator/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252784087,"owners_count":21803604,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["android","android-development","apps","automation","deployment","git","gradle-plugin","mobile","version-manager","versioning"],"created_at":"2024-10-03T15:48:14.657Z","updated_at":"2025-05-06T23:23:27.401Z","avatar_url":"https://github.com/SUPERCILEX.png","language":"Kotlin","funding_links":["https://github.com/sponsors/SUPERCILEX"],"categories":[],"sub_categories":[],"readme":"\u003ch1 align=\"center\"\u003e\n    Version Orchestrator\n\u003c/h1\u003e\n\n\u003cp align=\"center\"\u003e\n    \u003ca href=\"https://github.com/SUPERCILEX/version-orchestrator/actions\"\u003e\n        \u003cimg src=\"https://github.com/SUPERCILEX/version-orchestrator/workflows/CI/CD/badge.svg\" /\u003e\n    \u003c/a\u003e\n    \u003c!-- TODO --\u003e\n    \u003ca href=\"https://plugins.gradle.org/plugin/com.supercilex.gradle.versions\"\u003e\n        \u003cimg src=\"https://img.shields.io/maven-metadata/v/https/plugins.gradle.org/m2/com/supercilex/gradle/versions/com.supercilex.gradle.versions.gradle.plugin/maven-metadata.xml.svg?label=Gradle%20Plugins%20Portal\" /\u003e\n    \u003c/a\u003e\n\u003c/p\u003e\n\nVersion Orchestrator provides an effortless and performant way to automate versioning your Android\napp.\n\n## Table of contents\n\n1. [How does it work?](#how-does-it-work)\n   1. [Version codes](#version-codes)\n   1. [Version names](#version-names)\n1. [Installation](#installation)\n   1. [Snapshot builds](#snapshot-builds)\n1. [Configuring Version Orchestrator](#configuring-version-orchestrator)\n   1. [Disabling version code configuration](#disabling-version-code-configuration)\n   1. [Disabling version name configuration](#disabling-version-name-configuration)\n   1. [Enabling debug build configuration](#enabling-debug-build-configuration)\n   1. [For existing apps](#for-existing-apps)\n\n## How does it work?\n\nVersion Orchestrator looks at your Git history to compute a version code and name for your app.\n\n### Version codes\n\nThe version code is a combination of the number of commits in your repository and your tag history,\nenabling support for hotfix releases. The math looks a little like this:\n\n```kt\nversionCode = existingAppOffset +\n        commitCount +\n        numberOfNonPatchTags +\n        100 * numberOfNonPatchTagsMinusOneIfIsRelease\n```\n\nFor example, you have 4 commits and tag a `1.0.0` release (`versionCode = 5`). On your\n5th commit, the version code will jump to `106`. You continue making commits until you realize a\ncritical bug needs to be fixed. Branching off the `1.0.0` release, you fix the bug and tag your\n`1.0.1` hotfix (`versionCode = 6`). After merging the hotfix and 3 other commits from your new\nfeatures back into master, you create a `1.1.0` release (`versionCode = 110`). On your 11th commit,\nthe version code will jump to `211`. This continues on, allowing you to make 100 patch releases for\neach major or minor release.\n\n### Version names\n\nThe version name is a combination of the latest tag, commit hash, dirtiness flag, and variant name.\nCurrently, it is calculated using [`git describe`](https://git-scm.com/docs/git-describe#_examples)\nand your `buildType` name plus `productFlavor` name (if present).\n\n## Installation\n\nApply the plugin to each individual `com.android.application` module where you want to use Version\nOrchestrator through the `plugins {}` DSL:\n\n\u003cdetails open\u003e\u003csummary\u003eKotlin\u003c/summary\u003e\n\n```kt\nplugins {\n    id(\"com.android.application\")\n    id(\"com.supercilex.gradle.versions\") version \"0.10.0\"\n}\n```\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\u003csummary\u003eGroovy\u003c/summary\u003e\n\n```groovy\nplugins {\n    id 'com.android.application'\n    id 'com.supercilex.gradle.versions' version '0.10.0'\n}\n```\n\n\u003c/details\u003e\n\n### Snapshot builds\n\nIf you're prepared to cut yourself on the bleeding edge of Version Orchestrator development,\nsnapshot builds are available from\n[Sonatype's `snapshots` repository](https://oss.sonatype.org/content/repositories/snapshots/com/supercilex/gradle/version-orchestrator/):\n\n\u003cdetails open\u003e\u003csummary\u003eKotlin\u003c/summary\u003e\n\n```kt\nbuildscript {\n    repositories {\n        // ...\n        maven(\"https://oss.sonatype.org/content/repositories/snapshots\")\n    }\n\n    dependencies {\n        // ...\n        classpath(\"com.supercilex.gradle:version-orchestrator:1.0.0-SNAPSHOT\")\n    }\n}\n```\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\u003csummary\u003eGroovy\u003c/summary\u003e\n\n```groovy\nbuildscript {\n    repositories {\n        // ...\n        maven { url 'https://oss.sonatype.org/content/repositories/snapshots' }\n    }\n\n    dependencies {\n        // ...\n        classpath 'com.supercilex.gradle:version-orchestrator:1.0.0-SNAPSHOT'\n    }\n}\n```\n\n\u003c/details\u003e\n\n## Configuring Version Orchestrator\n\nVersion Orchestrator offers several options to fit your use case.\n\n### Disabling version code configuration\n\nTo handle version codes yourself, disable version code configuration:\n\n```kt\nversionOrchestrator {\n    configureVersionCode.set(false)\n}\n```\n\n### Disabling version name configuration\n\nTo handle version names yourself, disable version name configuration:\n\n```kt\nversionOrchestrator {\n    configureVersionName.set(false)\n}\n```\n\n### Enabling debug build configuration\n\nTo make debug builds as fast as possible, version codes and names are never changed in debug builds\nby default. To enable versioning, enable debug build configuration:\n\n```kt\nversionOrchestrator {\n    configureDebugBuilds.set(true)\n}\n```\n\n### For existing apps\n\nIf your app already has an established version code, you can tell Version Orchestrator about it:\n\n```kt\nversionOrchestrator {\n    versionCodeOffset.set(123)\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsupercilex%2Fversion-orchestrator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsupercilex%2Fversion-orchestrator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsupercilex%2Fversion-orchestrator/lists"}