Skip to content

Installation

Zahid edited this page Jun 30, 2025 · 4 revisions

Installation

This guide will help you add Deskit to your Compose for Desktop project. Choose the option that matches your project setup.

Requirements

Before installing Deskit, ensure your project meets these requirements:

  • Kotlin: 2.1.20+
  • Compose Multiplatform: 1.7.3+
  • JVM: 17+

Installation Options

Option 1: Repository Management in build.gradle.kts

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)
}

Option 2: Repository Management in settings.gradle.kts

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")
}

Version Information

Current Version: 1.3.0

implementation("com.github.zahid4kh:deskit:1.3.0")

Previous Versions

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")

Importing Components

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.InfoDialog

Verification

To 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 }
        )
    }
}

Troubleshooting

Common Issues

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

Getting Help

If you encounter issues during installation:

  1. Create a new issue if your problem isn't already reported
  2. Include your Gradle files and error messages when reporting issues

Next Steps

Once Deskit is installed, check out the Quick Start guide to learn how to use the components in your application.

Clone this wiki locally