Skip to content

Commit

Permalink
docu
Browse files Browse the repository at this point in the history
  • Loading branch information
MFlisarWork committed Nov 19, 2024
1 parent 9c34624 commit 7a3233e
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 0 deletions.
29 changes: 29 additions & 0 deletions documentation/docs/migration/v0.7.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
---
icon: material/arrow-up-box
---

!!! info

Version `7.*` is a kotlin multiplatform rewrite, that's why some fundamantal changes needed to be done!

Overall some things have become extension functions to provide target specific implementations. Platform specific functions and overloads have been added to provide a good single platform experience and some typos have been fixed as well.

Following is an overview on what has changed and shows how you can migrate your project.

#### DataStoreStorage

I do provide platform specific `create` function to make single platform usage easier. On android those do look like following now:

```kotlin
val storage = DataStoreStorage.create(name = "...")
```

In MP projects you can simply use the classes themself if you want to.

Additionally the class was moved from `import com.michaelflisar.kotpreferences.datastore.DataStoreStorage` to `com.michaelflisar.kotpreferences.storage.datastore.DataStoreStorage`.

#### enumPref

The `enumPref` function that does not need an array of all enum values became an extension function and only exists on android (because the `Enum.entries` field does not exist on all platforms).

You need to import `import com.michaelflisar.kotpreferences.core.enumPref` on android now to keep using this function.
2 changes: 2 additions & 0 deletions documentation/mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,8 @@ nav:
- Storage - DataStore: modules/datastore.md
- Storage - Key-Value: modules/key-value.md
- Encryption: modules/encryption.md
- Migration:
- Version 0.7: migration/v0.7.md
- More:
- Other Libraries: other-libraries.md
- About Me: me.md

0 comments on commit 7a3233e

Please sign in to comment.