compareVersions

fun compareVersions(first: String, second: String): Int

Compares two dot-separated versions.

Supports an optional v prefix, missing trailing components, semantic-version prerelease identifiers and build metadata. Returns a negative value when first is older, zero when both versions have the same precedence, and a positive value when first is newer.