Skip to content

Commit

Permalink
prepare for ktor's 3.0.0 release + fix java toolchain resolution
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrea De Bellis authored and christian-draeger committed May 3, 2024
1 parent 382f21b commit 0cf3e5c
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 6 deletions.
4 changes: 2 additions & 2 deletions buildSrc/src/main/kotlin/Deps.kt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
object Versions {
const val kotlin = "1.9.10"
const val coroutines = "1.6.1"
const val ktor = "2.0.3"
const val ktor = "3.0.0-beta-1"
const val serialization = "1.0.1"
const val jsoup = "1.13.1"
const val htmlUnit = "2.63.0"
Expand Down Expand Up @@ -59,7 +59,7 @@ object Deps {
val serverNetty = dependency("ktor-server-netty")
val serverTestHost = dependency("ktor-server-test-host")
val freemarker = dependency("ktor-server-freemarker")
val locations = dependency("ktor-server-locations")
val resources = dependency("ktor-server-resources")
}

object KotlinX {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import it.skrape.selects.html5.span
import kotlinx.coroutines.runBlocking
import org.junit.jupiter.api.Test
import strikt.api.expectThat
import strikt.assertions.contains
import strikt.assertions.isEqualTo

Check warning on line 8 in examples/use-pre-release-version/src/test/kotlin/BleedingEdgeReleaseTest.kt

View workflow job for this annotation

GitHub Actions / qodana

Unused import directive

Unused import directive
import strikt.assertions.isGreaterThanOrEqualTo

Expand Down Expand Up @@ -48,7 +49,7 @@ class BleedingEdgeReleaseTest {
}
}

expectThat(title).isEqualTo("Introduction - skrape{it}")
expectThat(title).contains("Introduction").contains("skrape{it}")
}

@Test
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ internal fun io.ktor.http.Cookie.toDomainCookie(origin: String): Cookie {
else -> Domain(domainUrl.urlOrigin, true)
}
val sameSite = this.extensions["SameSite"].toSameSite()
val maxAge = this.maxAge.toMaxAge()
val maxAge = this.maxAge?.toMaxAge()

return Cookie(this.name, this.value, expires, maxAge, domain, path, sameSite, this.secure, this.httpOnly)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ private fun io.ktor.http.Cookie.toDomainCookie(origin: String): Cookie {
else -> Domain(domainUrl.urlOrigin, true)
}
val sameSite = this.extensions["SameSite"].toSameSite()
val maxAge = this.maxAge.toMaxAge()
val maxAge = this.maxAge?.toMaxAge()

return Cookie(this.name, this.value, expires, maxAge, domain, path, sameSite, this.secure, this.httpOnly)
}
Expand Down
2 changes: 1 addition & 1 deletion ktor-extension/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ dependencies {
provided(Deps.Ktor.serverTestHost)
provided(Deps.Ktor.serverNetty)
provided(Deps.Ktor.freemarker)
provided(Deps.Ktor.locations)
provided(Deps.Ktor.resources)
}

// TODO: use https://github.com/nebula-plugins/gradle-extra-configurations-plugin to get provided configuration in gradle
Expand Down
4 changes: 4 additions & 0 deletions settings.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,8 @@ dependencyResolutionManagement {
repositoriesMode.set(RepositoriesMode.PREFER_SETTINGS)
}

plugins {
id("org.gradle.toolchains.foojay-resolver-convention") version ("0.4.0")
}

// Gradle Plugin versions are defined in ./buildSrc/build.gradle.kts

0 comments on commit 0cf3e5c

Please sign in to comment.