Skip to content
Merged
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
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ Change Log

### Fixed:

- Native targets now use Curl based Http client, which should support HTTPS
connections now.
- Linux and MacOS now use the Curl and Darwin engines for HTTP requests,
allowing SSL requests on both platforms through platform trusted certificates.

### Changed:

Expand Down
41 changes: 1 addition & 40 deletions buildSrc/src/main/kotlin/library.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ plugins {
}

kotlin {
applyDefaultHierarchyTemplate()
jvm()

js {
Expand Down Expand Up @@ -30,44 +31,4 @@ kotlin {
linuxX64()

mingwX64()

sourceSets{
val commonMain by sourceSets.getting

val linuxX64Main by sourceSets.getting
val macosArm64Main by sourceSets.getting
val macosX64Main by sourceSets.getting
val mingwX64Main by sourceSets.getting

val nativeMain by sourceSets.creating {
dependsOn(commonMain)
linuxX64Main.dependsOn(this)
macosArm64Main.dependsOn(this)
macosX64Main.dependsOn(this)
}

val windowsMain by sourceSets.creating {
dependsOn(commonMain)
mingwX64Main.dependsOn(this)
}

val iosArm64Main by sourceSets.getting
val iosX64Main by sourceSets.getting
val watchosArm32Main by sourceSets.getting
val watchosArm64Main by sourceSets.getting
val watchosX64Main by sourceSets.getting
val tvosArm64Main by sourceSets.getting
val tvosX64Main by sourceSets.getting

val iosMain by sourceSets.creating {
dependsOn(commonMain)
iosArm64Main.dependsOn(this)
iosX64Main.dependsOn(this)
watchosArm32Main.dependsOn(this)
watchosArm64Main.dependsOn(this)
watchosX64Main.dependsOn(this)
tvosArm64Main.dependsOn(this)
tvosX64Main.dependsOn(this)
}
}
}
58 changes: 22 additions & 36 deletions discover/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -6,54 +6,40 @@ plugins {

kotlin {
sourceSets {
val commonMain by getting {
dependencies {
implementation(libs.serialization.json)
api(libs.coroutines.core)
implementation(projects.serialization)
api(projects.structures)

implementation(libs.ktor.client.core)
implementation(libs.ktor.client.contentnegotiation)
implementation(libs.ktor.serialization.json)
}
commonMain.dependencies {
implementation(libs.serialization.json)
api(libs.coroutines.core)
implementation(projects.serialization)
api(projects.structures)

implementation(libs.ktor.client.core)
implementation(libs.ktor.client.contentnegotiation)
implementation(libs.ktor.serialization.json)
}

val commonTest by getting {
dependencies {
implementation(libs.test.core)
implementation(libs.test.annotations)
}
commonTest.dependencies {
implementation(libs.test.core)
implementation(libs.test.annotations)
}

val jvmMain by getting {
dependencies {
implementation(libs.ktor.client.okhttp)
}
jvmMain.dependencies {
implementation(libs.ktor.client.okhttp)
}

val nativeMain by getting {
dependencies {
implementation(libs.ktor.client.cio)
}
linuxMain.dependencies {
implementation(libs.ktor.client.curl)
}

val windowsMain by getting {
dependencies {
implementation(libs.ktor.client.winhttp)
}
mingwMain.dependencies {
implementation(libs.ktor.client.winhttp)
}

val iosMain by getting {
dependencies {
implementation(libs.ktor.client.darwin)
}
appleMain.dependencies {
implementation(libs.ktor.client.darwin)
}

val jsMain by getting {
dependencies {
implementation(libs.ktor.client.js)
}
jsMain.dependencies {
implementation(libs.ktor.client.js)
}
}
}
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package inkapplications.shade.discover

import io.ktor.client.engine.*
import io.ktor.client.engine.cio.*
import io.ktor.client.engine.curl.Curl

internal actual class PlatformModule actual constructor() {
actual fun createEngine(): HttpClientEngineFactory<*> = CIO
actual fun createEngine(): HttpClientEngineFactory<*> = Curl
}
1 change: 0 additions & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
version=2.0-SNAPSHOT
group=com.inkapplications.shade
org.gradle.jvmargs=-Xmx4g
kotlin.mpp.applyDefaultHierarchyTemplate=false
62 changes: 24 additions & 38 deletions internals/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -6,56 +6,42 @@ plugins {

kotlin {
sourceSets {
val commonMain by getting {
dependencies {
implementation(libs.serialization.json)
implementation(libs.ktor.client.core)
implementation(projects.serialization)
api(projects.structures)
api(libs.kimchi.logger)

implementation(libs.ktor.client.contentnegotiation)
implementation(libs.ktor.serialization.json)
}
commonMain.dependencies {
implementation(libs.serialization.json)
implementation(libs.ktor.client.core)
implementation(projects.serialization)
api(projects.structures)
api(libs.kimchi.logger)

implementation(libs.ktor.client.contentnegotiation)
implementation(libs.ktor.serialization.json)
}

val jvmMain by getting {
dependencies {
implementation(libs.ktor.client.okhttp)
implementation(libs.okhttp.tls)
implementation(libs.okhttp.sse)
}
commonTest.dependencies {
implementation(libs.test.core)
implementation(libs.test.annotations)
}

val jsMain by getting {
dependencies {
implementation(libs.ktor.client.js)
}
jvmMain.dependencies {
implementation(libs.ktor.client.okhttp)
implementation(libs.okhttp.tls)
implementation(libs.okhttp.sse)
}

val nativeMain by getting {
dependencies {
implementation(libs.ktor.client.curl)
}
jsMain.dependencies {
implementation(libs.ktor.client.js)
}

val windowsMain by getting {
dependencies {
implementation(libs.ktor.client.winhttp)
}
linuxMain.dependencies {
implementation(libs.ktor.client.curl)
}

val iosMain by getting {
dependencies {
implementation(libs.ktor.client.darwin)
}
mingwMain.dependencies {
implementation(libs.ktor.client.winhttp)
}

val commonTest by getting {
dependencies {
implementation(libs.test.core)
implementation(libs.test.annotations)
}
appleMain.dependencies {
implementation(libs.ktor.client.darwin)
}
}
}