Infer a project's version from your Git repository.
APACHE-2.0 License
Bot releases are hidden (Show)
Dependency updates. The zafarkhaja/semver library had a bunch of breaking changes, but it doesn't appear that any of those will affect the outward behavior. Please open an issue if you find otherwise.
None
None
None
Tested against the following versions.
Java Version | Gradle Versions |
---|---|
11 | 7.0.2, 7.6.4, 8.0.2, 8.6 |
17 | 7.3.3, 7.6.4, 8.0.2, 8.6 |
21 | 8.4, 8.6 |
Minor improvement for people interacting with the tasks during another settings plugin. Also now tested against Gradle 8.5.
None
None
None
Tested against the following versions.
Java Version | Gradle Versions |
---|---|
11 | 7.0.2, 7.6.1, 8.0.2, 8.5, 8.6-rc-1 |
17 | 7.3.3, 7.6.1, 8.0.2, 8.5, 8.6-rc-1 |
21 | 8.4, 8.5, 8.6-rc-1 |
Small patch release to update dependencies and resolve a deprecation.
None
None
forUseAtConfigurationTime
function from GradleNone
Tested against the following versions.
Java Version | Gradle Versions |
---|---|
11 | 7.0.2, 7.6.1, 8.0.2, 8.4 |
17 | 7.3.3, 7.6.1, 8.0.2, 8.4 |
21 | 8.4 |
This release decouples reckon from grgit, using direct JGit
for version inference and CLI Git for tag creation and pushes. The motivation is selfishly just to simplify maintenance of reckon.
For most cases, this should be a transparent change, but it does have a few potentially user-facing effects:
git
installed (which you almost certainly do)reckonTagPush
, you must have your credentials set up already in some way that won't require a prompt (basic auth creds, SSH agent, whatever). The old org.ajoberstar.grgit.*
properties or GRGIT_*
environment variables are no longer used.Generally, we will be using the current user's identity (user.email
and user.name
) to create the tag. In cases where that information is not present (for example, in GitHub Actions), we'll use the author identity from the most recent commit.
This release contains a couple other small changes as well, see below.
defaultInferredScope
no longer defaults to minor
and must be set explicitlyScope
enum is now accepted for defaultInferredScope
and parallelBranchScope
--info
to see status details from JGit if reckon fails due to an unclean repoNone
Tested against the following versions.
Java Version | Gradle Versions |
---|---|
11 | 7.0.2, 7.6.1, 8.0.2, 8.1.1 |
17 | 7.3.3, 7.6.1, 8.0.2, 8.1.1 |
This release implements a new org.ajoberstar.reckon.settings
plugin that can be used as an alternative to org.ajoberstar.reckon
. This is applied in a settings.gradle
instead of a build.gradle
but is otherwise configured the same. By applying to Settings, it will run and be configured before any projects are evaluated, which should avoid the timing issues uncovered in #147. The settings plugin does not have the same "soft-fail" workaround that the project plugin has, as it should not be needed.
Additionally we have improvements to version inference logic. Our prior parallel version logic allowed reckon to increment by the requested scope a second time in order to avoid a parallel version. However, if that version is also in the parallel branch, it would fail saying the version was already claimed.
In the new logic, you are able to set a parallelBranchScope
to indicate how you use your parallel branches. For example, people use branches like maintenance/1.2.x
should set it to MINOR
. Users of branches like maintenance/2.x
should set it to MAJOR.
When reckon identifies a conflict with a parallel branch, it will increment by the greater of the user-provided scope and parallelBranchScope
.
O abc123
O abc124 (v1.2.0)
| \
| O abc125 (v1.2.1)
O abc126
In the old logic, commit abc126
would infer as 1.2.2-alpha.0.1+abc126
where in the new logic (with parallelBranchScope=MINOR
) it would infer as 1.3.0-alpha.0.1+abc126
.
org.ajoberstar.reckon.settings
plugin that can be applied in settings.gradle
as an alternative to the normal plugin. This ensures reckon gets configured before project plugins.None
Tested against the following versions.
Java Version | Gradle Versions |
---|---|
11 | 7.0.2, 7.6.1, 8.0.2, 8.1.1 |
17 | 7.3.3, 7.6.1, 8.0.2, 8.1.1 |
This release implements a new org.ajoberstar.reckon.settings
plugin that can be used as an alternative to org.ajoberstar.reckon
. This is applied in a settings.gradle
instead of a build.gradle
but is otherwise configured the same. By applying to Settings, it will run and be configured before any projects are evaluated, which should avoid the timing issues uncovered in #147.
Additionally we have improvements to version inference logic. Our prior parallel version logic allowed reckon to increment by the requested scope a second time in order to avoid a parallel version. However, if that version is also in the parallel branch, it would fail saying the version was already claimed.
In the new logic, you are able to set a parallelBranchScope
to indicate how you use your parallel branches. For example, people use branches like maintenance/1.2.x
should set it to MINOR
. Users of branches like maintenance/2.x
should set it to MAJOR.
When reckon identifies a conflict with a parallel branch, it will increment by the greater of the user-provided scope and parallelBranchScope
.
O abc123
O abc124 (v1.2.0)
| \
| O abc125 (v1.2.1)
O abc126
In the old logic, commit abc126
would infer as 1.2.2-alpha.0.1+abc126
where in the new logic (with parallelBranchScope=MINOR
) it would infer as 1.3.0-alpha.0.1+abc126
.
org.ajoberstar.reckon.settings
plugin that can be applied in settings.gradle
as an alternative to the normal plugin. This ensures reckon gets configured before project plugins.None
Tested against the following versions.
Java Version | Gradle Versions |
---|---|
11 | 7.0.2, 7.5.1 |
17 | 7.3.3, 7.5.1 |
This release implements a new org.ajoberstar.reckon.settings
plugin that can be used as an alternative to org.ajoberstar.reckon
. This is applied in a settings.gradle
instead of a build.gradle
but is otherwise configured the same. By applying to Settings, it will run and be configured before any projects are evaluated, which should avoid the timing issues uncovered in #147.
Additionally we have improvements to version inference logic. Our prior parallel version logic allowed reckon to increment by the requested scope a second time in order to avoid a parallel version. However, if that version is also in the parallel branch, it would fail saying the version was already claimed.
In the new logic, you are able to set a parallelBranchScope
to indicate how you use your parallel branches. For example, people use branches like maintenance/1.2.x
should set it to MINOR
. Users of branches like maintenance/2.x
should set it to MAJOR.
When reckon identifies a conflict with a parallel branch, it will increment by the greater of the user-provided scope and parallelBranchScope
.
O abc123
O abc124 (v1.2.0)
| \
| O abc125 (v1.2.1)
O abc126
In the old logic, commit abc126
would infer as 1.2.2-alpha.0.1+abc126
where in the new logic (with parallelBranchScope=MINOR
) it would infer as 1.3.0-alpha.0.1+abc126
.
None
org.ajoberstar.reckon.settings
plugin that can be applied in settings.gradle
as an alternative to the normal plugin. This ensures reckon gets configured before project plugins.None
Tested against the following versions.
Java Version | Gradle Versions |
---|---|
11 | 7.0.2, 7.5.1 |
17 | 7.3.3, 7.5.1 |
This release implements a new org.ajoberstar.reckon.settings
plugin that can be used as an alternative to org.ajoberstar.reckon
. This is applied in a settings.gradle
instead of a build.gradle
but is otherwise configured the same. By applying to Settings, it will run and be configured before any projects are evaluated, which should avoid the timing issues uncovered in #147.
Additionally we have improvements to version inference logic. Our prior parallel version logic allowed reckon to increment by the requested scope a second time in order to avoid a parallel version. However, if that version is also in the parallel branch, it would fail saying the version was already claimed.
In the new logic, if we bump the target normal in order to avoid a parallel version and that version is still in the parallel versions
list, we increment by a higher scope (i.e. by MAJOR if they requested MINOR or by MINOR if they requested PATCH).
This may resolve many of the bugs we had with parallel version handling.
The two unintuitive parts are that it may still not increment as far as someone wants in some cases. And in others someone could be surprised that we incremented by a higher scope than they asked for.
To deal with the latter, we may want to consider making a distinction between "soft" and "hard" scopes (i.e. did they explicitly ask for the scope or did it get inferred). This was clearer in the past, when "inferred" really only meant no input from the scope calc. However, with the new commit message scope calc, that's really more of a "soft" scope request than an explicit one. It's trickier because to the Reckoner there's no difference between commit message scope calcs and explicit user-requested scope calcs.
org.ajoberstar.reckon.settings
plugin that can be applied in settings.gradle
as an alternative to the normal plugin. This ensures reckon gets configured before project plugins.None
Tested against the following versions.
Java Version | Gradle Versions |
---|---|
11 | 7.0.2, 7.5.1 |
17 | 7.3.3, 7.5.1 |
Our prior parallel version logic allowed reckon to increment by the requested scope a second time in order to avoid a parallel
version. However, if that version is also in the parallel branch, it would fail saying the version was already claimed.
In the new logic, if we bump the target normal in order to avoid a parallel version and that version is still in the parallel versions
list, we increment by a higher scope (i.e. by MAJOR if they requested MINOR or by MINOR if they requested PATCH).
This may resolve many of the bugs we had with parallel version handling.
The two unintuitive parts are that it may still not increment as far as someone wants in some cases. And in others someone could be surprised that we incremented by a higher scope than they asked for.
To deal with the latter, we may want to consider making a distinction between "soft" and "hard" scopes (i.e. did they explicitly ask for the scope or did it get inferred). This was clearer in the past, when "inferred" really only meant no input from the scope calc. However, with the new commit message scope calc, that's really more of a "soft" scope request than an explicit one. It's trickier because to the Reckoner there's no difference between commit message scope calcs and explicit user-requested scope calcs.
None
Tested against the following versions.
Java Version | Gradle Versions |
---|---|
11 | 7.0.2, 7.5.1 |
17 | 7.3.3, 7.5.1 |
This provides a fix for NullPointerExceptions that have become more common with changes in Gradle 7.4 that stem from evaluation order issues and other plugins that call project.getVersion().toString()
at configuration time. This allows builds to work, though there is some small risk that some config in the project will have the incorrect version unspecified
instead of the desired version reckon would calculate.
In the cases where you see the following warning:
Project version evaluated before reckon was configured. Run with --info to see cause.
You can rerun the build with --info
to see the exception that would have been thrown in prior versions. This can help you track down which plugin is too eagerly evaluating the version, in case you want to try to fix that.
None
None
Tested against the following versions.
Java Version | Gradle Versions |
---|---|
11 | 7.0.2, 7.4 |
17 | 7.3.3, 7.4 |
The highlight of 0.16.0 is support for scope inference via commit messages. See the README for details.
General commit message format reckon looks for:
<scope>(optional area of codebase): rest of message
body is not used
Example:
major: Dropped support for Gradle 5
This is a breaking change reoving support for Gradle 5 due to use of a new feature in Gradle 6.
This feature is not limited to this convention alone, but this is the one I made easy to turn on.
None
None
None
Tested against the following versions.
Java Version | Gradle Versions |
---|---|
11 | 7.0.2, 7.4 |
17 | 7.3.3, 7.4 |
Many new configuration options on the ReckonExtension
addressing long asked for features.
None
reckon.tagParser
and reckon.tagWriter
to customize how versions are found from tags and named when created. This can be useful for monrepos.reckon.tagMessage
to customize how tag messages are createdreckon.defaultInferredScope
to customize what scope is used if no input is providedreckon.remote
to override which remote the tag is pushed toNone
Tested against the following versions.
Java Version | Gradle Versions |
---|---|
11 | 7.0.2, 7.4 |
17 | 7.3.3, 7.4 |
Upgrades to Grgit 5 and supports Gradle's configuration cache
reckon.setNormal()
and reckon.setStage()
methods--configuration-cache
Provider<Version>
to allow access to the metadata of the version #156None
None
Tested against the following versions.
Java Version | Gradle Versions |
---|---|
11 | 7.0.2, 7.4 |
17 | 7.3.3, 7.4 |
Upgrades to Grgit 5 and supports Gradle's configuration cache
reckon.setNormal()
and reckon.setStage()
methods--configuration-cache
Provider<Version>
to allow access to the metadata of the version #156None
None
Tested against the following versions.
Java Version | Gradle Versions |
---|---|
11 | 7.0.2, 7.4 |
17 | 7.3.3, 7.4 |
Drop publishing directly to Gradle plugin portal to really ensure POM references static versions. Plugin is still published to Maven Central (which the Gradle plugin portal proxies), so no changes should be needed from consumers.
None
None
None
Tested against the following versions.
Java Version | Gradle Versions |
---|---|
8 | 4.0.2, 4.10.3, 5.0, 5.6.4, 6.0.1, 6.9.2, 7.0.2, 7.4 |
11 | 5.0, 5.6.4, 6.0.1, 6.9.2, 7.0.2, 7.4 |
17 | 7.3.3, 7.4 |
Publish to Maven Central and ensure POM references static versions.
None
None
None
Tested against the following versions.
Java Version | Gradle Versions |
---|---|
8 | 4.0.2, 4.10.3, 5.0, 5.6.4, 6.0.1, 6.6.1, 6.7-rc-1 |
11 | 5.0, 5.6.4, 6.0.1, 6.6.1, 6.7-rc-1 |
15 | 6.3, 6.6.1, 6.7-rc-1 |
Publish to Maven Central and ensure POM references static versions.
None
None
None
Tested against the following versions.
Java Version | Gradle Versions |
---|---|
8 | 4.0.2, 4.10.3, 5.0, 5.6.4, 6.0.1, 6.6.1, 6.7-rc-1 |
11 | 5.0, 5.6.4, 6.0.1, 6.6.1, 6.7-rc-1 |
15 | 6.3, 6.6.1, 6.7-rc-1 |
Update dependencies and confirming support for Gradle 6.6 and Java 15.
None
None
None
Tested against the following versions.
Java Version | Gradle Versions |
---|---|
8 | 4.0.2, 4.10.3, 5.0, 5.6.4, 6.0.1, 6.6.1, 6.7-rc-1 |
11 | 5.0, 5.6.4, 6.0.1, 6.6.1, 6.7-rc-1 |
15 | 6.3, 6.6.1, 6.7-rc-1 |
Upgrade to grgit 4.0.0.
None
None
None
Tested against the following versions.
Java Version | Gradle Versions |
---|---|
8 | 4.0, 4.10.3, 5.0, 5.6.4 |
11 | 5.0, 5.6.4, 6.0.1, 6.1-milestone-1 |
Upgrade to grgit 4.0.0.
None
None
None
Tested against the following versions.
Java Version | Gradle Versions |
---|---|
8 | 4.0, 4.10.3, 5.0, 5.6.4 |
11 | 5.0, 5.6.4, 6.0.1, 6.1-milestone-1 |