Getting Started

A Scala 3 versioning toolkit - version types, parsing, manipulation, automatic derivation from Git, and build integration.


Modules

Module Platforms Description
version JVM, Native Version model, parsing, operations
version-resolution JVM, Native Automatic version derivation from Git
version-cli Native CLI binary (shipped on GitHub Releases)
sbt-version sbt 2.x Build integration
// Core library
libraryDependencies += "africa.shuwari" %%% "version" % "0.9.0"

// Automatic versioning
libraryDependencies += "africa.shuwari" %%% "version-resolution" % "0.9.0"

// sbt plugin
addSbtPlugin("africa.shuwari" % "sbt-version" % "0.9.0")

Quick Example

import version.semver.*

val v = SemVer.parseUnsafe("1.2.3-alpha.1")

v.major.value          // 1
v.preRelease.isDefined // true

v.next[Major]   // 2.0.0
v.next[Minor]   // 1.3.0
v.next[Alpha]   // 1.2.3-alpha.2
v.as[Snapshot]  // 1.2.3-SNAPSHOT
v.core          // 1.2.3

Automatic Versioning

The resolution engine and sbt plugin derive versions from Git state:

  1. Git tags mark releases - annotated tags define version boundaries
  2. Commit directives express intent - breaking:, feature:, target: 2.0.0
  3. Build tools compute versions - the sbt plugin resolves versions automatically

Next Steps


Platform Support

Scala JDK Scala Native
3.8.4+ 17.0.19+ 0.5.12+

Licence

Licensed under the Apache License, Version 2.0.