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
  •  
  •  
  •  
1 change: 1 addition & 0 deletions buildSrc/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ dependencies {
val kotlin_version = libs.versions.kotlin.get()
implementation(kotlin("gradle-plugin", kotlin_version))
implementation(kotlin("serialization", kotlin_version))
implementation(kotlin("compiler-embeddable", kotlin_version))

val ktlint_version = libs.versions.ktlint.get()
implementation("org.jmailen.gradle:kotlinter-gradle:$ktlint_version")
Expand Down
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
4 changes: 2 additions & 2 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
[versions]
kotlin = "2.0.20"
kotlin = "2.1.0-Beta1"
kotlinx-html = "0.11.0"
kotlinx-datetime = "0.6.1"
kotlinx-io = "0.5.4"
coroutines = "1.8.1"
coroutines = "1.9.0-RC.2"
atomicfu = "0.25.0"
serialization = "1.7.3"
ktlint = "3.15.0"
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