Skip to content

Commit

Permalink
📝 Document the installation process
Browse files Browse the repository at this point in the history
  • Loading branch information
vinceglb committed Feb 1, 2025
1 parent fb74587 commit 3ccd764
Show file tree
Hide file tree
Showing 5 changed files with 80 additions and 98 deletions.
97 changes: 0 additions & 97 deletions docs/development.mdx

This file was deleted.

4 changes: 4 additions & 0 deletions docs/dialogs/setup.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
---
title: 'Setup'
description: 'Learn how to preview changes locally'
---
68 changes: 68 additions & 0 deletions docs/installation.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
---
title: Installation
description: 'Install FileKit in your Kotlin Multiplatform project'
---

import FilekitVersion from '/snippets/filekit-version.mdx'

To use FileKit in your Kotlin Multiplatform / Compose Multiplatform project, you need to add the dependency to your `build.gradle.kts` file.

FileKit supports those targets:
- Android
- iOS, macOS
- JVM (Windows, macOS, Linux)
- JS, WASM

## Dialogs

FileKit can helps you to display dialogs to the user like file, directory and photo pickers, save dialogs, camera and more. FileKit dialogs are available in two flavors:

```kotlin build.gradle.kts
// Enables FileKit dialogs without Compose dependencies
implementation("io.github.vinceglb:filekit-dialogs:0.10.0")

// Enables FileKit dialogs with Composable utilities
implementation("io.github.vinceglb:filekit-dialogs-compose:0.10.0")
```

## PlatformFile

FileKit provides a platform-agnostic file abstraction called `PlatformFile`. It allows you to work with files in a platform-agnostic way. You can create, read, write, and delete files using the `PlatformFile` API.

You can use `PlatformFile` in your project by adding the following dependency:

```kotlin build.gradle.kts
implementation("io.github.vinceglb:filekit-core:0.10.0")
```

## Coil

FileKit provides a Coil extension to load images from a `PlatformFile` object. You can use the `PlatformFile` object to load images from a file.

You can use the Coil extension in your project by adding the following dependency:

```kotlin build.gradle.kts
implementation("io.github.vinceglb:filekit-coil:0.10.0")
```

## Linux setup

If using JVM target and Linux distribution, you need to add the following module:

```kotlin build.gradle.kts
compose.desktop {
application {
nativeDistributions {
linux {
modules("jdk.security.auth")
}
}
}
}
```

It prevents having a `NoClassDefFoundError` on some cases. Read more about it [here](https://github.com/vinceglb/FileKit/issues/107).

---

Next, continue your journey with the [Setup](/dialogs/setup) guide.
8 changes: 7 additions & 1 deletion docs/mint.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,13 @@
"pages": [
"introduction",
"quickstart",
"development"
"installation"
]
},
{
"group": "Dialogs",
"pages": [
"dialogs/setup"
]
},
{
Expand Down
1 change: 1 addition & 0 deletions docs/snippets/filekit-version.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
0.10.0

0 comments on commit 3ccd764

Please sign in to comment.