Skip to content

Releases: davideas/GrabVer

v2.1.0

Choose a tag to compare

@davideas davideas released this 15 Mar 23:36

Compatibility

  • Users: Gradle 7.0+ / Java 11+
  • Contributors: Gradle 8.x wrapper / JDK 17+

Added

  • CHANGELOG.md file to track all notable changes.
  • Optional property incrementBuild (default: true) to prevent constant modifications of version.properties - Resolves #26, #29
  • Added internal function hasUserChanges() detection - allows to save file when user manually changes main version values.
  • Gradle defaultTasks() included in runTasks evaluation - Resolves #33
  • Android Product Flavor support - recognizes flavor tasks like assembleFreeRelease, bundleProRelease - Resolves #25
  • Android detection - checks for com.android.application or com.android.library plugins.
  • ⚠️ grabverVerbose task (renamed from grabverDebug) for verbose logging.
  • GrabVer tasks are now registered under versioning group.
  • Gradle wrapper for development/publishing.

Changed

  • ⚠️ Property incrementOn now also triggers save: Custom release task (like deploy/publish) defined via incrementOn
    is now correctly detected as save-task, ensuring version changes are always persisted.
  • ⚠️ Task monitoring improvements:
    Monitored tasks only track user-invoked tasks, filtering out internal sub-tasks (e.g., AGP's bundleLib*) from
    build output. gradle build is treated as debug even if AGP executes both assembleDebug and assembleRelease
    internally. Use gradle assembleRelease explicitly to trigger release versioning.
  • ⚠️ Task Matching Logic with case-sensitive comparison, consistent with Gradle's own behavior.
    Separated exact match tasks from prefix+suffix patterns. Suffix patterns (Debug/Release) match Android's
    camelCase convention (e.g., assembleFreeRelease, bundleProDebug).
  • Comprehensive logging - "release" vs "debug" build clarity and better task status display
  • Android-specific logging - shows 'Code' messages only for Android projects.
  • Modern Gradle API - replaced deprecated project.task() with project.tasks.register().
  • Independent settings.gradle for test modules (composite build testing).

Deprecated

  • saveOn - will be removed in next major release. Use incrementOn instead.
    With incrementOn covering custom release tasks and incrementBuild controlling debug build behavior,
    there is no remaining scenario requiring a custom save task. Default save tasks already cover all standard builds.

Fixed

  • NPE when user doesn't access versioning values - shows a warning message.
  • Version code starting from 0 now correctly produces code=1 on the first release. Previously, a debug build
    would save code=1 to the file, causing the first release to skip to code=2. The version code is now guaranteed
    to be ≥ 1 at read time (required by Android), while the file preserves the raw value - Further fix for #15, #17

v2.0.3

Choose a tag to compare

@davideas davideas released this 01 Aug 14:12

Patch

  • Support for latest Gradle version 8.x and OrderedProperties 1.0.4.
  • Removed jCentral.
  • Using new plugin for Gradle Plugin Portal publication.

v2.0.2

Choose a tag to compare

@davideas davideas released this 01 Oct 19:28

Improvements

  • Pull request #22 - Upgrade OrderedProperties dependency for Java11.
  • Resolves #23 - Support for "module/someDir/sub-module" location.

v2.0.1

Choose a tag to compare

@davideas davideas released this 25 Jun 21:43

Improvements

  • Reduced verbosity
  • Added grabverDebug dummy task to print debug steps

v2.0.0

Choose a tag to compare

@davideas davideas released this 17 Jun 21:04

Deprecation

  • Removed attribute dependsOn.
  • Removed task grabverSkip, became obsolete after new solution.
  • Removed getter getFullVersionName (fullVersionName) in favor of getFullName (versioning.fullName).

New features

  • Resolves #19 - Added optional attribute incrementOn: accepts a custom task name to trigger the version increase based on the rules (tasks supported by default: assembleRelease, bundleRelease, grabverRelease)
  • The plugin now evaluates the run tasks in silent mode to automatically skip the new version evaluation and to not print unnecessary logs if no save task was detected. A single warning line is however produced.
    Single tasks performed such as clean, test, flyway and all third parties invented plugin tasks out there will not trigger the versioning evaluation. Example:
Command Outcome
gradle clean test Evaluation skipped
gradle javadoc Evaluation skipped
gradle flywayClean Evaluation skipped
gradle clean build Evaluation triggered and new values saved
gradle clean war grabverRelease Evaluation triggered, versioning increased and new values saved

Improvements

  • Resolves #21 - First run on Gradle syncing (gradle <no tasks>) will generate the properties file with default values 1.0.0 #1 code=1 even without user configuration. In all others cases the properties file is saved when it passes the silent evaluation and the save tasks complete with success. Note: To trigger the evaluation, the user must grab at least one value.
  • New values are now saved when all tasks have been completed and build is finished.
  • When gradle is executed without tasks (for instance when Gradle is syncing to import the changes in IntelliJ IDEA), the evaluation is skipped and a warning log informs the user.
  • Added more default save tasks for attribute saveOn: (now supported by default: build, assembleDebug, assembleRelease, bundleDebug, bundleRelease, grabverRelease, jar, war, explodedWar).
  • An info log line is produced with the outcome of the execution state showing which task triggered the saving.
  • Added colors and bold effects to the logs.
  • General code and logs improvements.

Fixes

  • Fixes #18 - Android bundle support: the correct task to monitor is bundleRelease. Code value will increase when this task is in runTasks.

v1.0.1

Choose a tag to compare

@davideas davideas released this 02 Dec 21:55

Improvements

  • Deprecated dependsOn in favor of saveOn to give a better idea of what this plugin property does.

Example, to have patch number automatically increased and saved on property file when task name jar is specified, run command line:

gradle jar grabverRelease

having

versioning {
    ....
    saveOn "jar"
}

Fixes

  • Fixes #16 - plugin is now available in Gradle Plugins repository.
  • Fixes #15 #17 - Version Code starts with 1
  • Fixes #14 #18 #20 - Code doesn't increase if the new Android bundle release

v1.0.0

Choose a tag to compare

@davideas davideas released this 02 Dec 12:42

Release of 23/08/2018

v0.7.0

Choose a tag to compare

@davideas davideas released this 15 Nov 18:43
  • Resolved #8 - Replace Hardcoded Pathseperators (supports unix/win file separator).
  • Resolved #9 - When the generate signed apk fails, should not increase the PATCH and the BUILD numbers.
    Introduced optional field dependsOn: saving versioning file depends by the task-name specified here (default: compileJava, assembleDebug & assembleRelease.
  • Resolved #11 - Optionally set directly the patch number: skips auto-increase.

v0.6.0

Choose a tag to compare

@davideas davideas released this 04 Oct 17:37
  • Added grabverSkip task, so calculation can be skipped
  • Improved toString
  • Resolved #7 - Ignoring preRelease "" empty string
  • Fixed #6 - Patch is not being increased in assembleRelease when Build Signed APK is chosen from the menu

v0.5.0

Choose a tag to compare

@davideas davideas released this 23 Sep 08:11
  • Fixed #3 - Error: A problem occurred configuring project ':app' caused by NPE
  • Resolved #5 - OrderedProperties in version.properties