Skip to content

Commit

Permalink
Add missing client dependencies #720
Browse files Browse the repository at this point in the history
  • Loading branch information
Foso committed Nov 10, 2024
1 parent c64072c commit fdcbbe1
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 30 deletions.
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
32 changes: 11 additions & 21 deletions ktorfit-lib/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import org.jetbrains.kotlin.gradle.targets.js.dsl.ExperimentalWasmDsl
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile

plugins {
kotlin("multiplatform")
Expand All @@ -18,16 +18,7 @@ licensee {
val enableSigning = project.hasProperty("signingInMemoryKey")

mavenPublishing {
val artifactId =
"ktorfit-lib" +
if (libs.versions.ktorVersion
.get()
.startsWith("3.")
) {
"-ktor-" + libs.versions.ktorVersion.get()
} else {
""
}
val artifactId = "ktorfit-lib"
coordinates(
libs.versions.groupId.get(),
artifactId,
Expand All @@ -40,19 +31,14 @@ mavenPublishing {
}
}

tasks.withType<org.jetbrains.kotlin.gradle.tasks.KotlinCompile> {
tasks.withType<KotlinCompile> {
kotlinOptions.jvmTarget = "1.8"
}

kotlin {
explicitApi()
if (libs.versions.ktorVersion
.get()
.startsWith("3.")
) {
@OptIn(ExperimentalWasmDsl::class)
wasmJs()
}
@OptIn(org.jetbrains.kotlin.gradle.ExperimentalWasmDsl::class)
wasmJs()
jvm {
}
js(IR) {
Expand Down Expand Up @@ -129,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 @@ -147,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 fdcbbe1

Please sign in to comment.