From 4e270f52b5a4c95c231f4098983755bf8fe068f2 Mon Sep 17 00:00:00 2001 From: Jens Klingenberg Date: Thu, 2 Mar 2023 22:20:21 +0100 Subject: [PATCH] Release 1.0.0 --- docs/CHANGELOG.md | 1 + docs/configuration.md | 9 +++++++++ docs/installation.md | 13 ++++++++----- docs/requests.md | 3 ++- .../androidonlyexample/MainActivity.kt | 1 + .../MultiplatformExample/shared/build.gradle.kts | 1 - 6 files changed, 21 insertions(+), 7 deletions(-) diff --git a/docs/CHANGELOG.md b/docs/CHANGELOG.md index 3a1e9493a..33de185a2 100644 --- a/docs/CHANGELOG.md +++ b/docs/CHANGELOG.md @@ -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 diff --git a/docs/configuration.md b/docs/configuration.md index 22c0ad7c7..a55839198 100644 --- a/docs/configuration.md +++ b/docs/configuration.md @@ -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() +``` \ No newline at end of file diff --git a/docs/installation.md b/docs/installation.md index 9c0e02512..7f5c365f3 100644 --- a/docs/installation.md +++ b/docs/installation.md @@ -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 { + 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") @@ -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{ @@ -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 diff --git a/docs/requests.md b/docs/requests.md index b4cc5abe6..6c93ed793 100644 --- a/docs/requests.md +++ b/docs/requests.md @@ -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() { diff --git a/example/AndroidOnlyExample/app/src/main/java/de/jensklingenberg/androidonlyexample/MainActivity.kt b/example/AndroidOnlyExample/app/src/main/java/de/jensklingenberg/androidonlyexample/MainActivity.kt index dcade5bed..b9c713f49 100644 --- a/example/AndroidOnlyExample/app/src/main/java/de/jensklingenberg/androidonlyexample/MainActivity.kt +++ b/example/AndroidOnlyExample/app/src/main/java/de/jensklingenberg/androidonlyexample/MainActivity.kt @@ -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 diff --git a/example/MultiplatformExample/shared/build.gradle.kts b/example/MultiplatformExample/shared/build.gradle.kts index 142c08696..f5ceaa83a 100644 --- a/example/MultiplatformExample/shared/build.gradle.kts +++ b/example/MultiplatformExample/shared/build.gradle.kts @@ -12,7 +12,6 @@ val ktorVersion = "2.2.4" val ktorfitVersion = "1.0.0" configure { - enabled = true version = ktorfitVersion }