SemanticVersion

data class SemanticVersion(val major: ULong, val minor: ULong, val patch: ULong, val preRelease: PreReleaseIdentifier = PreReleaseIdentifier.EMPTY, val buildMetadata: PreReleaseIdentifier = PreReleaseIdentifier.EMPTY) : Comparable<SemanticVersion>

A class representing semantic versions: major.minor.patch-preRelease+buildMetadata.

Constructors

Link copied to clipboard
constructor(major: String, minor: String, patch: String, preRelease: String = "", buildMetadata: String = "")
constructor(major: ULong, minor: ULong, patch: ULong, preRelease: PreReleaseIdentifier = PreReleaseIdentifier.EMPTY, buildMetadata: PreReleaseIdentifier = PreReleaseIdentifier.EMPTY)

Types

Link copied to clipboard
object Companion

Constants and utilities for working with semantic versions.

Properties

Link copied to clipboard
Link copied to clipboard

True if this version is in the form major.minor.patch, with no further identifiers.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Functions

Link copied to clipboard
open operator override fun compareTo(other: SemanticVersion): Int
Link copied to clipboard

Creates a new SemanticVersion with the major version increased by 1 and the minor and patch reset to 0.

Link copied to clipboard

Creates a new SemanticVersion with the minor version increased by 1 and the patch reset to 0, while keeping the major version.

Link copied to clipboard

Creates a new SemanticVersion with the patch version increased by 1, while keeping the major and minor versions.

Link copied to clipboard
open override fun toString(): String
Link copied to clipboard

Creates the same SemanticVersion, but without build metadata.