Skip to content
This repository was archived by the owner on Jul 13, 2020. It is now read-only.
This repository was archived by the owner on Jul 13, 2020. It is now read-only.

Add cheap alternative to 'configuration' for checking only SDK version #118

Closed
@yanex

Description

@yanex

Something like

inline fun fromSdk(version: Int, f: () -> Unit) {
    if (Build.VERSION.SDK_INT >= version) f()
}

inline fun ifSdk(version: Int, f: () -> Unit) { //whenSdk?
    if (Build.VERSION.SDK_INT == version) f()
}

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions