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

Update suspendapp-ktor to support ktor 3 and arrow 2 #135

Open
wants to merge 7 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
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 4 additions & 25 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import org.jetbrains.dokka.gradle.DokkaTask
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
import org.jetbrains.kotlin.gradle.dsl.JvmTarget

plugins {
alias(libs.plugins.kotlin.multiplatform)
Expand All @@ -24,8 +24,8 @@ kotlin {
// We set up custom targets rather than use Arrow Gradle Config for Kotlin,
// Since we don't support all targets but only subset where having this behavior makes sense.
jvm {
compilations.all {
kotlinOptions.jvmTarget = "1.8"
compilerOptions {
jvmTarget = JvmTarget.JVM_1_8
}
}
js(IR) {
Expand All @@ -39,28 +39,11 @@ kotlin {
macosX64()

sourceSets {
val commonMain by getting {
commonMain {
dependencies {
api(libs.coroutines)
}
}

val jvmMain by getting
val jsMain by getting
val mingwX64Main by getting
val linuxX64Main by getting
val macosArm64Main by getting
val macosX64Main by getting
val linuxArm64Main by getting

create("nativeMain") {
dependsOn(commonMain)
linuxX64Main.dependsOn(this)
macosArm64Main.dependsOn(this)
macosX64Main.dependsOn(this)
mingwX64Main.dependsOn(this)
linuxArm64Main.dependsOn(this)
}
}
}

Expand All @@ -85,10 +68,6 @@ tasks {
}
}

withType<KotlinCompile>().configureEach {
kotlinOptions.jvmTarget = "1.8"
}

register<Delete>("cleanDocs") {
val folder = file("docs").also { it.mkdir() }
val docsContent = folder.listFiles().filter { it != folder }
Expand Down
11 changes: 2 additions & 9 deletions example/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import org.jetbrains.kotlin.gradle.ExperimentalKotlinGradlePluginApi
import org.jetbrains.kotlin.gradle.plugin.mpp.NativeBuildType.RELEASE

plugins {
kotlin("multiplatform")
alias(libs.plugins.kotlin.multiplatform)
}

repositories {
Expand Down Expand Up @@ -34,18 +34,11 @@ kotlin {
}

sourceSets {
val commonMain by getting {
commonMain {
dependencies {
implementation(project.rootProject)
implementation(libs.arrow.fx)
}
}

val jvmMain by getting
val jsMain by getting
val mingwX64Main by getting
val linuxX64Main by getting
val macosArm64Main by getting
val macosX64Main by getting
}
}
16 changes: 8 additions & 8 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
[versions]
kotlin = "2.0.0"
coroutines = "1.8.1"
kotlin = "2.1.0"
coroutines = "1.9.0"
dokka = "1.9.20"
arrowGradleConfig = "0.12.0-rc.6"
kotlinBinaryCompatibilityValidator = "0.14.0"
arrowGradleConfig = "0.12.0-rc.24"
kotlinBinaryCompatibilityValidator = "0.16.3"
knit = "0.5.0"
ktor = "2.3.12"
arrow = "1.2.4"
ktor = "3.0.2"
arrow = "2.0.0"

[libraries]
coroutines = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-core", version.ref = "coroutines" }
kotlinx-knit = { module = "org.jetbrains.kotlinx:kotlinx-knit", version.ref = "knit" }
ktor-core = {module = "io.ktor:ktor-server-host-common", version.ref = "ktor"}
arrow-fx = {module = "io.arrow-kt:arrow-fx-coroutines", version.ref = "arrow"}
ktor-core = { module = "io.ktor:ktor-server-host-common", version.ref = "ktor" }
arrow-fx = { module = "io.arrow-kt:arrow-fx-coroutines", version.ref = "arrow" }

[plugins]
arrowGradleConfig-formatter = { id = "io.arrow-kt.arrow-gradle-config-formatter", version.ref = "arrowGradleConfig" }
Expand Down
Loading
Loading