Skip to content

Commit

Permalink
Add missing client dependencies #720 (#734)
Browse files Browse the repository at this point in the history
  • Loading branch information
Foso authored Nov 10, 2024
2 parents 4289868 + 559533c commit 12484e6
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 12 deletions.
1 change: 1 addition & 0 deletions docs/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ OptIn annotations on interfaces and functions will now be propagated to the gene

- Fixed documentation for converters to match the current version.
- Unresolved reference setBody in generated API implementations [#726](https://github.com/Foso/Ktorfit/issues/726)
- [Android] App crashes if not using Ktor platform client [#720](https://github.com/Foso/Ktorfit/issues/720)

# [2.1.0]()

Expand Down
10 changes: 4 additions & 6 deletions example/AndroidOnlyExample/app/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
plugins {
id("com.android.application")
id("org.jetbrains.kotlin.android")
id("com.google.devtools.ksp") version "2.0.20-1.0.24"
id("com.google.devtools.ksp") version "2.0.21-1.0.27"
id("org.jetbrains.kotlin.plugin.serialization") version "2.0.21"
id("de.jensklingenberg.ktorfit") version "2.0.1"
id("de.jensklingenberg.ktorfit") version "2.1.0"
id("org.jetbrains.kotlin.plugin.compose") version "2.0.21"
}

Expand Down Expand Up @@ -52,8 +52,8 @@ tasks.withType<org.jetbrains.kotlin.gradle.tasks.KotlinCompile>().configureEach
}
}

val ktorfit = "2.0.0"
val ktor = "2.3.11"
val ktorfit = "2.1.0"
val ktor = "3.0.1"
val compose_ui_version = "1.7.4"
dependencies {
implementation("de.jensklingenberg.ktorfit:ktorfit-lib:$ktorfit")
Expand All @@ -63,8 +63,6 @@ dependencies {
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.8.6")
implementation("androidx.activity:activity-compose:1.9.3")
implementation("androidx.compose.ui:ui:$compose_ui_version")
Expand Down
4 changes: 2 additions & 2 deletions example/MultiplatformExample/shared/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ plugins {
kotlin("multiplatform")
kotlin("native.cocoapods")
id("com.android.library")
id("com.google.devtools.ksp") version "2.0.21-1.0.25"
id("com.google.devtools.ksp") version "2.0.21-1.0.27"
id("kotlinx-serialization")
id("de.jensklingenberg.ktorfit") version "2.1.0"
}
Expand All @@ -15,7 +15,7 @@ ktorfit {
}

version = "1.0"
val ktorVersion = "2.3.11"
val ktorVersion = "3.0.1"
val ktorfitVersion = "2.1.0"

kotlin {
Expand Down
2 changes: 1 addition & 1 deletion gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ ktor-client-core-mingwx64 = { module = "io.ktor:ktor-client-core-mingwx64", vers
ktor-client-curl = { module = "io.ktor:ktor-client-curl", version.ref = "ktorVersion" }
ktor-client-ios = { module = "io.ktor:ktor-client-ios", version.ref = "ktorVersion" }
ktor-client-js = { module = "io.ktor:ktor-client-js", version.ref = "ktorVersion" }

ktor-client-okhttp = { module = "io.ktor:ktor-client-okhttp", version.ref = "ktorVersion" }
ktor-client-json-js = { module = "io.ktor:ktor-client-json-js", version.ref = "ktorVersion" }
ktor-client-logging = { module = "io.ktor:ktor-client-logging", version.ref = "ktorVersion" }
ktor-client-mock = { module = "io.ktor:ktor-client-mock", version.ref = "ktorVersion" }
Expand Down
9 changes: 6 additions & 3 deletions ktorfit-lib/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import org.jetbrains.kotlin.gradle.targets.js.dsl.ExperimentalWasmDsl
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile

plugins {
Expand Down Expand Up @@ -116,7 +115,7 @@ kotlin {
}
val androidMain by getting {
dependencies {
implementation(libs.ktor.client.cio.jvm)
implementation(libs.ktor.client.okhttp)
}
}
val jvmMain by getting {
Expand All @@ -134,7 +133,11 @@ kotlin {
}
}

val iosMain by getting
val iosMain by getting {
dependencies {
implementation(libs.ktor.client.ios)
}
}
}
}
val javadocJar by tasks.registering(Jar::class) {
Expand Down

0 comments on commit 12484e6

Please sign in to comment.