Skip to content

Commit

Permalink
Set Snapshot version
Browse files Browse the repository at this point in the history
  • Loading branch information
Foso committed Apr 27, 2024
1 parent 529c098 commit ce3ef2e
Show file tree
Hide file tree
Showing 5 changed files with 59 additions and 2 deletions.
8 changes: 8 additions & 0 deletions docs/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,14 @@ and this project orients towards [Semantic Versioning](http://semver.org/spec/v2
Note: This project needs KSP to work and every new Ktorfit with an update of the KSP version is technically a breaking change.
But there is no intent to bump the Ktorfit major version for every KSP update.

2.0.0-beta1 - Unreleased
========================================
Had to remove the deprecated code. This is a breaking change.
This will simplify the codebase and make it easier to maintain.
When you haven't used the deprecated converters, there is not much you need to change.
Some converters that were previously auto applied now need to be added manually.
See the migration guide for more information: https://foso.github.io/Ktorfit/migration/#from-2-to-200

1.14.0 - 2024-04-15
========================================
- Build with KSP 1.0.20, Kotlin 2.0.0-RC1, Ktor 2.3.10
Expand Down
13 changes: 12 additions & 1 deletion docs/converters/converters.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,15 @@ They are added inside of a Converter.Factory which will then be added to the Kto

### Existing converter factories
* CallConverterFactory
* FlowConverterFactoy

Add this dependency:
```kotlin
implementation("de.jensklingenberg.ktorfit:ktorfit-converters-call:$ktorfit")
```

* FlowConverterFactory

Add this dependency:
```kotlin
implementation("de.jensklingenberg.ktorfit:ktorfit-converters-flow:$ktorfit")
```
34 changes: 34 additions & 0 deletions docs/migration.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,42 @@
Here is how to migrate from deprecated code:

## From <2 to 2.0.0
* You used Response?

Add this dependency:

```kotlin
implementation("de.jensklingenberg.ktorfit:ktorfit-converters-response:$ktorfit")
```

and add this converter to your Ktorfit instance:
```kotlin
.addConverterFactory(ResponseConverterFactory())
```

* You used Call?

Add this dependency:
```kotlin
implementation("de.jensklingenberg.ktorfit:ktorfit-converters-call:$ktorfit")
```

and add this converter to your Ktorfit instance:
```kotlin
.addConverterFactory(CallConverterFactory())
```

* You used Flow?

Add this dependency:
```kotlin
implementation("de.jensklingenberg.ktorfit:ktorfit-converters-flow:$ktorfit")
```

and add this converter to your Ktorfit instance:
```kotlin
.addConverterFactory(FlowConverterFactory())
```

## From 1.7.0 to 1.8.1

Expand Down
4 changes: 3 additions & 1 deletion example/AndroidOnlyExample/app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ plugins {
id("org.jetbrains.kotlin.android")
id("com.google.devtools.ksp") version "1.9.23-1.0.20"
id("org.jetbrains.kotlin.plugin.serialization") version "1.9.23"
id("de.jensklingenberg.ktorfit") version "1.14.0"
id("de.jensklingenberg.ktorfit") version "2.0.0-beta1-SNAPSHOT"
}


Expand Down Expand Up @@ -61,6 +61,8 @@ dependencies {
implementation("io.ktor:ktor-client-content-negotiation:$ktor")
implementation("io.ktor:ktor-serialization-kotlinx-json:$ktor")
implementation("de.jensklingenberg.ktorfit:ktorfit-converters-response:$ktorfit")
implementation("de.jensklingenberg.ktorfit:ktorfit-converters-call:$ktorfit")
implementation("de.jensklingenberg.ktorfit:ktorfit-converters-flow:$ktorfit")


implementation("androidx.lifecycle:lifecycle-runtime-ktx:2.6.2")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import androidx.lifecycle.lifecycleScope
import de.jensklingenberg.androidonlyexample.ui.theme.AndroidOnlyExampleTheme
import de.jensklingenberg.ktorfit.converter.builtin.CallConverterFactory
import de.jensklingenberg.ktorfit.converter.builtin.FlowConverterFactory
import de.jensklingenberg.ktorfit.converter.builtin.ResponseConverterFactory
import de.jensklingenberg.ktorfit.ktorfit
import io.ktor.client.HttpClient
import io.ktor.client.plugins.contentnegotiation.ContentNegotiation
Expand All @@ -31,6 +32,7 @@ val ktorfit = ktorfit {
converterFactories(
FlowConverterFactory(),
CallConverterFactory(),
ResponseConverterFactory()
)

}
Expand Down

0 comments on commit ce3ef2e

Please sign in to comment.