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

wooga / atlas-version / 14 / 1
76%
master: 76%

Build:
DEFAULT BRANCH: master
Ran 03 Jun 2020 10:25AM UTC
Files 21
Run time 4s
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

03 Jun 2020 10:25AM UTC coverage: 81.925% (+4.2%) from 77.724%
14.1

push

jenkins

Add versionCode generation (#7)

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 ha... (continued)

417 of 509 relevant lines covered (81.93%)

0.82 hits per line

Source Files on job 14.1
  • Tree
  • List 0
  • Changed 18
  • Source Changed 18
  • Coverage Changed 5
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Build 14
  • 165dc680 on github
  • Prev Job for on master (#13.1)
  • Next Job for on master (#16.3)
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