Version

class Version(val major: Int, val minor: Int, val patch: Int)

Represents a standard semantic versioning three-part format for a dependency's version number. Primarily intended to parse and more reliably compare String version numbers.

Constructors

Link copied to clipboard
constructor(major: Int, minor: Int, patch: Int)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
val major: Int

Given a version number X.Y.Z, the MAJOR version X denoting incompatible API changes.

Link copied to clipboard
val minor: Int

Given a version number X.Y.Z, the MINOR version Y denoting backward compatible API changes.

Link copied to clipboard
val patch: Int

Given a version number X.Y.Z, the PATCH version Z denoting backward compatible bug fixes.

Functions

Link copied to clipboard
fun covers(version: BigDecimal): Boolean

Returns whether this Version is greater than or equal to the specified BigDecimal version.

fun covers(version: String): Boolean

Returns whether this Version is greater than or equal to the specified String version.

fun covers(version: Version): Boolean

Returns whether this Version is greater than or equal to the specified version instance.

fun covers(major: Int, minor: Int = 0, patch: Int = 0): Boolean

Returns whether this Version is greater than or equal to the specified version number parts.

Link copied to clipboard
open operator override fun equals(other: Any?): Boolean
Link copied to clipboard
open override fun hashCode(): Int
Link copied to clipboard
open override fun toString(): String