Version

data class Version(val major: Int, val minor: Int = 0, val patch: Int = 0) : Comparable<Version>

Represents a semantic version that can be compared with others or used to form a version range. Version objects are used to enable version-aware behavior in engine plugins.

Use toString if a full version string is required instead of separate components.

See also

Constructors

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

Types

Link copied to clipboard
object Companion
Link copied to clipboard
data class Range(val min: Version = Zero, val max: Version? = null, val includeMin: Boolean = true, val includeMax: Boolean = true)

A range of versions, which can be queried to see if a Version falls in a specific range. Use the normal range operators or extensions to create version ranges.

Properties

Link copied to clipboard
val major: Int

Major version component.

Link copied to clipboard
val minor: Int = 0

Minor version component.

Link copied to clipboard
val patch: Int = 0

Patch version component.

Functions

Link copied to clipboard

Returns a version range including this and every higher version.

Link copied to clipboard

Returns a version range including this and every lower version.

Link copied to clipboard
open operator override fun compareTo(other: Version): Int
Link copied to clipboard
open override fun toString(): String