Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Supports static linking for curl engine #3981

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
4 changes: 2 additions & 2 deletions buildSrc/src/main/kotlin/KotlinExtensions.kt
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@ val Project.kotlinter: KotlinterExtension get() = the()
fun KotlinMultiplatformExtension.createCInterop(
name: String,
cinteropTargets: List<String>,
block: DefaultCInteropSettings.() -> Unit
block: DefaultCInteropSettings.(String) -> Unit
) {
cinteropTargets.mapNotNull { targets.findByName(it) }.filterIsInstance<KotlinNativeTarget>().forEach {
val main by it.compilations
main.cinterops.create(name, block)
main.cinterops.create(name) { block(it.name) }
}
}

Expand Down
2 changes: 1 addition & 1 deletion gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[versions]
kotlin-version = "2.0.20"
kotlin-version = "2.1.0-dev-5974"
kotlinx-html-version = "0.11.0"
kotlinx-datetime = "0.6.1"
kotlinx-io = "0.5.1"
Expand Down
16 changes: 3 additions & 13 deletions ktor-client/ktor-client-curl/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -22,19 +22,9 @@ plugins {
}

kotlin {
createCInterop("libcurl", listOf("macosX64", "linuxX64", "mingwX64")) {
definitionFile = File(projectDir, "desktop/interop/libcurl.def")
includeDirs.headerFilterOnly(paths)
}

createCInterop("libcurl", listOf("macosArm64")) {
definitionFile = File(projectDir, "desktop/interop/libcurl_arm64.def")
includeDirs.headerFilterOnly(paths)
}

createCInterop("libcurl", listOf("linuxArm64")) {
definitionFile = File(projectDir, "desktop/interop/libcurl_linux_arm64.def")
includeDirs.headerFilterOnly(listOf("desktop/interop/linuxArm64/include/"))
createCInterop("libcurl", listOf("linuxX64", "linuxArm64", "macosX64", "macosArm64", "mingwX64")) { name ->
definitionFile = File(projectDir, "desktop/interop/$name/libcurl.def")
includeDirs.headerFilterOnly("desktop/interop/$name/include/")
}

sourceSets {
Expand Down
56 changes: 0 additions & 56 deletions ktor-client/ktor-client-curl/desktop/interop/libcurl.def

This file was deleted.

24 changes: 0 additions & 24 deletions ktor-client/ktor-client-curl/desktop/interop/libcurl_arm64.def

This file was deleted.

This file was deleted.

Loading