-
Notifications
You must be signed in to change notification settings - Fork 0
Installation
This guide will help you add Deskit to your Compose for Desktop project. Choose the option that matches your project setup.
Before installing Deskit, ensure your project meets these requirements:
- Kotlin: 2.1.20+
- Compose Multiplatform: 1.7.3+
- JVM: 17+
If you manage repositories in your module-level build.gradle.kts file, follow this approach:
plugins {
kotlin("jvm")
id("org.jetbrains.compose")
id("org.jetbrains.kotlin.plugin.compose")
}
repositories {
maven { url = uri("https://jitpack.io") }
maven("https://maven.pkg.jetbrains.space/public/p/compose/dev")
mavenCentral()
google()
}
dependencies {
implementation(compose.desktop.currentOs)
implementation("com.github.zahid4kh:deskit:1.3.0")
}
kotlin {
jvmToolchain(17)
}If you prefer to manage repositories in your settings.gradle.kts file:
Step 1: Add the JitPack repository to your settings.gradle.kts:
dependencyResolutionManagement {
repositories {
maven { url = uri("https://jitpack.io") }
maven("https://maven.pkg.jetbrains.space/public/p/compose/dev")
mavenCentral()
google()
}
}Step 2: Add the dependency to your module-level build.gradle.kts:
dependencies {
implementation(compose.desktop.currentOs)
implementation("com.github.zahid4kh:deskit:1.3.0")
}implementation("com.github.zahid4kh:deskit:1.3.0")If you want to use an older version (no need for that honestly speaking):
// Version 1.2.1
implementation("com.github.zahid4kh:deskit:1.2.1")
// Version 1.2.0
implementation("com.github.zahid4kh:deskit:1.2.0")Once installed, you can import Deskit components in your Compose files:
import deskit.dialogs.file.filechooser.FileChooserDialog
import deskit.dialogs.file.filesaver.FileSaverDialog
import deskit.dialogs.file.folderchooser.FolderChooserDialog
import deskit.dialogs.confirmation.ConfirmationDialog
import deskit.dialogs.info.InfoDialogTo verify the installation, create a simple InfoDialog:
@Composable
fun TestDeskit() {
var showDialog by remember { mutableStateOf(false) }
Button(onClick = { showDialog = true }) {
Text("Test Deskit")
}
if (showDialog) {
InfoDialog(
title = "Success!",
message = "Deskit is installed and working correctly.",
onClose = { showDialog = false }
)
}
}Repository not found error:
- Ensure you've added the JitPack repository correctly
- Check that your internet connection allows access to JitPack
Version conflict:
- Make sure you're using compatible versions of Kotlin and Compose
- Check the Requirements section above
Import errors:
- Verify the dependency is correctly added to your
build.gradle.kts - Perform a Gradle sync after adding the dependency
If you encounter issues during installation:
- Create a new issue if your problem isn't already reported
- Include your Gradle files and error messages when reporting issues
Once Deskit is installed, check out the Quick Start guide to learn how to use the components in your application.
Made with ❤️ | Free stuff is the best stuff