This library allows easily accessing system- and runtime-information.
Currently, the API exposes the following information:
- System memory
- Size
- Available
- Used
- Operating system
- System family (Windows, Linux, macOS etc.)
- Name
- Vendor
- Version
- Runtime
- Type (ART, JVM, Native etc.)
- Name
- Vendor
- Version
- Environment
- Memory
- Size
- Available
- Used
All of this information is available through the global Platform singleton.
First, add the official Maven Central repository to your settings.gradle.kts:
dependencyResolutionManagement {
repositories {
maven("https://central.sonatype.com/repository/maven-snapshots")
mavenCentral()
}
}Then add a dependency on the library in your root buildscript:
kotlin {
sourceSets {
commonMain {
dependencies {
implementation("dev.karmakrafts.kplatform:kplatform-core:<version>")
}
}
}
}Or, if you are only using Kotlin/JVM, add it to your top-level dependencies block instead.