diff --git a/ksoup-network/build.gradle.kts b/ksoup-network/build.gradle.kts index 7ec33564..a5826d06 100644 --- a/ksoup-network/build.gradle.kts +++ b/ksoup-network/build.gradle.kts @@ -42,6 +42,8 @@ kotlin { } } + applyDefaultHierarchyTemplate() + sourceSets { commonMain.dependencies { compileOnly(projects.ksoup) @@ -52,25 +54,42 @@ kotlin { implementation(projects.ksoup) } - jvmMain.dependencies { - implementation(libs.ktor.client.okhttp) + val nonJsMain by creating { + dependsOn(commonMain.get()) + } + + jvmMain { + dependsOn(nonJsMain) + dependencies { + implementation(libs.ktor.client.okhttp) + } } - androidMain.dependencies { - implementation(libs.ktor.client.okhttp) + androidMain { + dependsOn(nonJsMain) + dependencies { + implementation(libs.ktor.client.okhttp) + } } - iosMain.dependencies { - implementation(libs.ktor.client.darwin) + iosMain { + dependsOn(nonJsMain) + dependencies { + implementation(libs.ktor.client.darwin) + } } - linuxMain.dependencies { - implementation(libs.ktor.client.cio) + linuxMain { + dependsOn(nonJsMain) + dependencies { + implementation(libs.ktor.client.cio) + } } jsMain.dependencies { implementation(libs.ktor.client.js) } + } }