Skip to content

Commit

Permalink
Release 1.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Foso committed Mar 2, 2023
1 parent f3f488c commit 4e270f5
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 7 deletions.
1 change: 1 addition & 0 deletions docs/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ NEW:
🐛 Bugs fixed

* Timeout throws exception outside of scope of SuspendResponseConverter #127
* Fix broken/outdated docs link (#140) by @T-Spoon

⬆️ Deps updates

Expand Down
9 changes: 9 additions & 0 deletions docs/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,12 @@ You can set it in your build.gradle.kts file,
1: Check for errors

2: Turn errors into warnings


# Add your own Ktor client
You can set your Ktor client instance to the Ktorfit builder:

```kotlin
val myClient = HttpClient()
val ktorfit = Ktorfit.Builder().httpClient(myClient).build()
```
13 changes: 8 additions & 5 deletions docs/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,21 @@
#### Gradle Plugins
You need to add KSP and the [Ktorfit Gradle plugin](https://plugins.gradle.org/plugin/de.jensklingenberg.ktorfit)
```kotlin

plugins {
id("com.google.devtools.ksp") version "CURRENT_KSP_VERSION"
id("de.jensklingenberg.ktorfit") version "1.0.0"
}

configure<de.jensklingenberg.ktorfit.gradle.KtorfitGradleConfiguration> {
version = "1.0.0"
}
```

Next you have to add the Ktorfit KSP Plugin to the common target and every compilation target, where you want to use Ktorfit.


```kotlin
val ktorfitVersion = "LATEST_KTORFIT_VERSION"
val ktorfitVersion = "1.0.0"

dependencies {
add("kspCommonMainMetadata", "de.jensklingenberg.ktorfit:ktorfit-ksp:$ktorfitVersion")
Expand All @@ -34,7 +37,7 @@ Look here for more information https://kotlinlang.org/docs/ksp-multiplatform.htm

Add the Ktorfit-lib to your common module.
```kotlin
val ktorfitVersion = "LATEST_KTORFIT_VERSION"
val ktorfitVersion = "1.0.0"

sourceSets {
val commonMain by getting{
Expand All @@ -45,5 +48,5 @@ sourceSets {
```

#### Ktor
Ktorfit is based on Ktor Clients 2.2.3. You don't need to add an extra dependency for the default clients.
When you want to use Ktor plugins for things like serialization, you need to add the dependencies and they need to be compatible with 2.2.3
Ktorfit is based on Ktor Clients 2.2.4. You don't need to add an extra dependency for the default clients.
When you want to use Ktor plugins for things like serialization, you need to add the dependencies, and they need to be compatible with 2.2.4
3 changes: 2 additions & 1 deletion docs/requests.md
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,8 @@ All your parameters annotated with @Part wil be combined and send as MultiPartFo

## JSON
Ktorfit doesn't parse JSON. You have to install the Json Feature to the Ktor Client that you add to Ktorfit.
See here : https://ktor.io/docs/serialization-client.html

See here [Add your own Ktor client](../configuration/#add-your-own-ktor-client) and here https://ktor.io/docs/serialization-client.html

```kotlin
val ktorClient = HttpClient() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import androidx.compose.runtime.mutableStateOf
import androidx.compose.ui.Modifier
import androidx.lifecycle.lifecycleScope
import de.jensklingenberg.androidonlyexample.ui.theme.AndroidOnlyExampleTheme
import de.jensklingenberg.ktorfit.Ktorfit
import de.jensklingenberg.ktorfit.converter.builtin.FlowResponseConverter
import de.jensklingenberg.ktorfit.create
import de.jensklingenberg.ktorfit.ktorfit
Expand Down
1 change: 0 additions & 1 deletion example/MultiplatformExample/shared/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ val ktorVersion = "2.2.4"
val ktorfitVersion = "1.0.0"

configure<de.jensklingenberg.ktorfit.gradle.KtorfitGradleConfiguration> {
enabled = true
version = ktorfitVersion
}

Expand Down

0 comments on commit 4e270f5

Please sign in to comment.