Skip to content

Commit

Permalink
Update to Kotlin 2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
raharrison committed Jul 12, 2024
1 parent 6c7e42c commit 38b9401
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 13 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
[![Kotlin](https://img.shields.io/badge/kotlin-1.9.23-blue.svg?logo=kotlin)](http://kotlinlang.org)
[![Ktor](https://img.shields.io/badge/ktor-2.3.10-blue.svg)](https://github.com/ktorio/ktor)
[![Kotlin](https://img.shields.io/badge/kotlin-2.0.0-blue.svg?logo=kotlin)](http://kotlinlang.org)
[![Ktor](https://img.shields.io/badge/ktor-2.3.12-blue.svg)](https://github.com/ktorio/ktor)
[![Build](https://github.com/raharrison/kotlin-ktor-exposed-starter/workflows/Build/badge.svg)](https://github.com/raharrison/kotlin-ktor-exposed-starter/actions/workflows/build.yml)
[![codecov](https://codecov.io/gh/raharrison/kotlin-ktor-exposed-starter/branch/master/graph/badge.svg?token=v2k9oObm0C)](https://codecov.io/gh/raharrison/kotlin-ktor-exposed-starter)

## Starter project to create a simple RESTful web service in Kotlin

**Updated for Kotlin 1.9.23 and Ktor 2.3.10**
**Updated for Kotlin 2.0.0 and Ktor 2.3.12**

Companion article: <https://ryanharrison.co.uk/2018/04/14/kotlin-ktor-exposed-starter.html>

Expand Down
12 changes: 6 additions & 6 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
val ktorVersion = "2.3.10"
val exposedVersion = "0.50.0"
val ktorVersion = "2.3.12"
val exposedVersion = "0.52.0"
val h2Version = "2.2.224"
val hikariCpVersion = "5.1.0"
val flywayVersion = "10.11.0"
val logbackVersion = "1.5.6"
val assertjVersion = "3.25.3"
val assertjVersion = "3.26.3"
val restAssuredVersion = "5.4.0"
val junitVersion = "5.10.1"

plugins {
kotlin("jvm") version "1.9.20"
kotlin("plugin.serialization") version "1.9.20"
id("org.jetbrains.kotlinx.kover") version "0.7.6"
kotlin("jvm") version "2.0.0"
kotlin("plugin.serialization") version "2.0.0"
id("org.jetbrains.kotlinx.kover") version "0.8.2"
application
}

Expand Down
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.9-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
6 changes: 3 additions & 3 deletions src/main/kotlin/service/WidgetService.kt
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@ class WidgetService {
}

suspend fun getWidget(id: Int): Widget? = dbExec {
Widgets.select {
(Widgets.id eq id)
}.map { toWidget(it) }
Widgets.selectAll()
.where { (Widgets.id eq id) }
.map { toWidget(it) }
.singleOrNull()
}

Expand Down

0 comments on commit 38b9401

Please sign in to comment.