KotlinFutureTestingVersion

data class KotlinFutureTestingVersion(versionKind: KotlinVersionKind, version: String, originalVersion: String)

The current Kotlin version and its kind, with helper methods for selecting library versions.

Constructors

KotlinFutureTestingVersion
Link copied to clipboard
fun KotlinFutureTestingVersion(versionKind: KotlinVersionKind, version: String, originalVersion: String)

Functions

ifFuture
Link copied to clipboard
fun ifFuture(future: (version: String) -> String): String
Get future if using a future version, else the original Kotlin version.
fun ifFuture(future: String): String
Get future if using a future version, else the original Kotlin version.
invoke
Link copied to clipboard
operator fun <T> invoke(pair: Pair<T, T>): T
Get Pair.second if using a future version, else Pair.first.
operator fun <T> invoke(normal: T, future: T): T
Get future if using a future version, else normal.
inline operator fun <T> invoke(normal: T, future: (version: String) -> T): T
Get future if using a future version, else normal.
select
Link copied to clipboard
infix fun <T> select(pair: Pair<T, T>): T
Get Pair.second if using a future version, else Pair.first.
fun <T> select(normal: T, future: T): T
Get future if using a future version, else normal.
inline fun <T> select(normal: T, future: (version: String) -> T): T
Get future if using a future version, else normal.

Properties

isBootstrap
Link copied to clipboard
val isBootstrap: Boolean
Whether we are using a future bootstrap version.
isEap
Link copied to clipboard
val isEap: Boolean
Whether we are using a future EAP version.
isFuture
Link copied to clipboard
val isFuture: Boolean
Whether we are using a future version.
isUnchanged
Link copied to clipboard
val isUnchanged: Boolean
Whether we are using the configured version (i.e.
originalVersion
Link copied to clipboard
val originalVersion: String
the Kotlin version before future version substitution
version
Link copied to clipboard
val version: String
the current Kotlin version
versionKind
Link copied to clipboard
val versionKind: KotlinVersionKind
the source of the current version

Sources

jvm source
Link copied to clipboard