• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

wooga / atlas-version / 3
82%
master: 76%

Build:
Build:
LAST BUILD BRANCH: PR-49
DEFAULT BRANCH: master
Ran 02 Jun 2020 05:12PM UTC
Jobs 3
Files 21
Run time 16min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

pending completion
3

push

jenkins

Add versionCode generation

Description
===========

This patch adds multiple schemes to generate or manual set a
versionCode. The strategies differ in two major ways:

semver version based
--------------------

A strategy based on a `semver` version number. This patch provides two
`schemes` to generate a version code from a given semver version string:

_`semverBasic`_

This scheme turns a semver version `major.minor.patch` into a integer
representation. Everything after the components is ignored. The version
components are not allowed to be higher than `99` This means that the
biggest version provided possible is `99.99.99`.
The resulting code is an integer with padded values.

`1.0.0`   => `10000`
`1.1.1`   => `10101`
`1.11.10` => `11110`

_`semver`_

The `semver` scheme is an opinionated addon to the `semverBasic` scheme.
The resulting code is extended by a revision counter. This counter has
only one digit so can't be higher than `9`. The revision is parsed from
a version with `-staging.{revision}` appended.

`1.0.0`           => `100000`
`1.0.0-staging.3` => `100003

release count based
-------------------

These schemes act more as a build number generator by counting all
reachable release tags from the current branch. An optional `offset` can
be provided to keep the generated version-code over a certain limit.

_`releaseCountBasic`_

Counts all reachable tags in the repo with final release versions
appended (e.g `v1.1.0`). It will skip any prerelease tags or any other
tags.

_ `releaseCount`_

Counts all kinds of release tags reachable from the current branch.
(e.g. `v1.1.0`, `v1.2.0-staging.1`)

configuration
-------------

*build.gradle*

```groovy
plugins {
    id "net.wooga.version" version "VERSION"
}

versionBuilder {
   versionScheme = "semver2"
   versionCodeScheme = "releaseCount"
   versionCodeOffset = 1000
}
```

You can also manually set a versionCode. This has to be done after this
plugin is applied.

```groovy
plugins {
    id "ne... (continued)

417 of 509 relevant lines covered (81.93%)

2.46 hits per line

Jobs
ID Job ID Ran Files Coverage
1 3.1 02 Jun 2020 05:12PM UTC 0
81.93
2 3.2 02 Jun 2020 05:13PM UTC 0
81.93
3 3.3 02 Jun 2020 05:27PM UTC 0
81.93
Source Files on build 3
Detailed source file information is not available for this build.
  • Back to Repo
  • Jenkins Build #3
  • 261f815c on github
  • Next Build on PR-7 (#4)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc