# VersionNumber

open class VersionNumber : Comparable<T> (source)

### Deprecated

This class is only here to maintain binary compatibility with existing plugins.

#### Deprecated

Will be removed in Gradle 9.0.

## Constructors

VersionNumber
Link copied to clipboard
constructor(major: Int, minor: Int, micro: Int, @Nullable qualifier: String)
constructor(major: Int, minor: Int, micro: Int, patch: Int, @Nullable qualifier: String)

## Types

Scheme
Link copied to clipboard
interface Scheme
Returns the version number scheme.

## Properties

major
Link copied to clipboard
val major: Int
micro
Link copied to clipboard
val micro: Int
minor
Link copied to clipboard
val minor: Int
patch
Link copied to clipboard
val patch: Int
qualifier
Link copied to clipboard
@get: Nullable
val qualifier: String
UNKNOWN
Link copied to clipboard
val UNKNOWN: VersionNumber

## Functions

compareTo
Link copied to clipboard
open fun compareTo(other: VersionNumber): Int
equals
Link copied to clipboard
open fun equals(@Nullable other: Any): Boolean
getBaseVersion
Link copied to clipboard
open fun getBaseVersion(): VersionNumber
hashCode
Link copied to clipboard
open fun hashCode(): Int
parse
Link copied to clipboard
open fun parse(versionString: String): VersionNumber
scheme
Link copied to clipboard
open fun scheme(): VersionNumber.Scheme
Returns the default MAJOR.MINOR.MICRO-QUALIFIER scheme.
toString
Link copied to clipboard
open fun toString(): String
version
Link copied to clipboard
open fun version(major: Int): VersionNumber
open fun version(major: Int, minor: Int): VersionNumber
withPatchNumber
Link copied to clipboard
open fun withPatchNumber(): VersionNumber.Scheme
Returns the MAJOR.MINOR.MICRO.PATCH-QUALIFIER scheme.