EasyVersion is a Gradle plugin that manage your app or library version.

Overview

EasyVersion release-status

EasyVersion is a Gradle plugin that manage your app or library version.

Before Downloading

Create easy_version.json in your root project directory with below content and modify them to match your needs.

{
  "major": 0,
  "minor": 0,
  "patch": 0,
  "snapshotVersion": null
}

Download Maven Central

" } ">
plugins {
  "com.github.k0shk0sh.easy.version" version "
   
    "
   
}

Possible Configurations

easyVersion {
  snapshotLabel = "-SNAPSHOT" // default. If snapshotVersionGenerator not provided.
  snapshotDefinition = SnapshotDefinition.TIMESTAMP // default. Or change to DATE_SECONDS, COMMIT.
  propertiesToSet = listOf("VERSION_NAME") // default.
  setToProjectVersion = true // default.
  logVersion = true // default = false. log versions everytime gradle syncs.
  snapshotVersionGenerator = { "myAwesomeSnapshotGenerator" } // default null to use snapshotDefinition.
}

Tasks

Running either one of the tasks will set your project to the new version automatically unless if set to false via the plugin extension configuration. Each task will also ensure to set all your supplied properties upon completion.

  • Next Major

    • Updates the version to the next possible major version and resets snapshot, minor & patch.
    • ./gradlew nextMajor
  • Next Minor

    • Updates the version to the next possible minor version and resets patch & snapshot.
    • ./gradlew nextMinor
  • Next Patch

    • Updates the version to the next patch version and resets snapshot.
    • ./gradlew nextPatch
  • Next Snapshot

    • Updates the snapshot version with either one of the snapshot definition supplied in plugin configuration.
    • ./gradlew nextSnapshot

Example

Before publishing your new awesome library, module or app, call either one of the tasks first followed by your releasing task.

You can also refer to ComposeEasyForms-Library that uses this library to manage its release update versioning.

P.S: this library uses itself to manage its release versioning.

Alternatively see release.yml for more details.

EasyVersion Properties

EasyVersion comes with two handy extensions specifically for Android projects:

  • rootproject.versionName returns the current version name or snapshot if its available.
  • rootProject.versionCode returns the current version code based on $major$minor$patch.toInt().
android {
  defaultConfig {
    versionCode = rootProject.versionCode as Int
    versionName = rootProject.versionName as String
  }
}

Contributions

Please contribute! We will gladly review any pull requests. Make sure to read the Contributing page first though.

You might also like...
KMP Ready is a Gradle Plugin that provides actionable advice to make your code Kotlin Multiplatform compatible.

KMP Ready IS 🚧 UNDER DEVELOPMENT 🚧 Decisioning Logic Positive Signals ✅ Only Kotlin .kt Source Files Using Kotlin JVM Plugin Uses the Kotlin Multipl

Gradle plugin that generates a Swift Package Manager manifest and an XCFramework to distribute a Kotlin Multiplatform library for Apple platforms.

Multiplatform Swift Package This is a Gradle plugin for Kotlin Multiplatform projects that generates an XCFramework for your native Apple targets and

 Gradle Plugin for Continuous Integration of AppSweep App Testing.
Gradle Plugin for Continuous Integration of AppSweep App Testing.

This Gradle plugin can be used to continuously integrate app scanning using AppSweep into your Android app build process

The core Gradle plugin and associated logic used for Slack's Android app

slack-gradle-plugin This repository contains the core Gradle plugin and associated logic used for Slack's Android app. This repo is effectively read-o

Gradle Plugin to enable auto-completion and symbol resolution for all Kotlin/Native platforms.
Gradle Plugin to enable auto-completion and symbol resolution for all Kotlin/Native platforms.

CompleteKotlin Gradle Plugin to enable auto-completion and symbol resolution for all Kotlin/Native platforms. What this plugin provides This zero-conf

A Gradle plugin that improves the experience when developing Android apps, especially system tools, that use hidden APIs.

A Gradle plugin that improves the experience when developing Android apps, especially system tools, that use hidden APIs.

Grazel is a Gradle plugin to automate generation of valid Bazel files for a given Android/Kotlin/Java project.

Grazel Grazel stands for Gradle to Bazel. It is a Gradle plugin that enables you to migrate Android projects to Bazel build system in an incremental a

Artifactory is a gradle plugin to assist in developing Minecraft mods that can target different modloaders.

Artifactory Artifactory is a gradle plugin to assist in developing Minecraft mods that can target different modloaders. Currently, Fabric and Forge ar

A Gradle Plugin to determine which modules were affected by a set of files in a commit.
A Gradle Plugin to determine which modules were affected by a set of files in a commit.

A Gradle Plugin to determine which modules were affected by a set of files in a commit. One use case for this plugin is for developers who would like to only run tests in modules which have changed in a given commit.

Releases(0.3.0)
Owner
Kosh Sergani
I'm a Networking by education & Android developer by choice.
Kosh Sergani
A Gradle plugin that generates plugin.yml for Bukkit/BungeeCord/Nukkit plugins based on the Gradle project

plugin-yml is a simple Gradle plugin that generates the plugin.yml plugin description file for Bukkit plugins, bungee.yml for Bungee plugins or nukkit.yml for Nukkit plugins based on the Gradle project. Various properties are set automatically (e.g. project name, version or description) and additional properties can be added using a simple DSL.

Plexus 0 Apr 10, 2022
Gradle Plugin to automatically upgrade your gradle project dependencies and send a GitHub pull request with the changes

Gradle Plugin to automatically upgrade your gradle project dependencies and send a GitHub pull request with the changes

Dipien 142 Dec 29, 2022
Gradle plugin that parses version updates and assigns them to groups of people.

Notifier Gradle Plugin This gradle plugin serves the need of automating how dependencies are handles in a project. More specifically, it functions usi

Plum 4 Oct 27, 2022
Gradle plugin for updating a project version catalog

Version catalog update plugin This plugin helps to keep the versions in a Gradle version catalog toml file up to date. The version updates are determi

Little Robots 307 Dec 26, 2022
A Gradle plugin for generating multi-version packet wrappers for Minecraft: JE

tinyprotocol A Gradle plugin for generating multi-version packet class wrappers for Minecraft: Java Edition. Usage plugins { id("me.kcra.tinyproto

Matouš Kučera 2 Feb 21, 2022
Gradm (Gradle dependencies manager) is a new way to manage dependencies easier and more efficient.

Gradm (Gradle dependencies manager) is a new way to manage dependencies easier and more efficient.

null 16 Jan 9, 2023
Gradle Plugin that allows you to decompile bytecode compiled with Jetpack Compose Compiler Plugin into Java and check it

decomposer Gradle Plugin that allows you to decompile bytecode compiled with Jetpack Compose Compiler Plugin into Java and check it How to use Run bui

Takahiro Menju 56 Nov 18, 2022
Gradle plugin which validates the licenses of your dependency graph match what you expect

Gradle plugin which validates the licenses of your dependency graph match what you expect

Cash App 502 Dec 31, 2022
Graphfity is a Gradle Plugin which creates a dependency node diagram graph about your internal modules dependencies, specially useful if you are developing a multi-module application

Graphfity creates a dependency nodes diagram graph about your internal modules dependencies, specially useful if you are developing a multi-module app

Iván Carrasco 27 Dec 20, 2022
Gradle plugin which analyzes the size of your Android apps

Scope is a Gradle plugin which helps you analyze the size of your Android apps. Motivation App size is an important metric which directly correlates w

Nanashi Li 1 Feb 26, 2022