Skip to content

Upgrade to Kotlin 2.1.10. #224

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

Open
wants to merge 4 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
2 changes: 1 addition & 1 deletion .github/workflows/maven-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
- name: Publish
uses: eskatos/gradle-command-action@v1
with:
gradle-version: 7.5.1
gradle-version: 7.6.3
arguments: publish --stacktrace
env:
sonatypeUsername: ${{ secrets.SONATYPE_USERNAME }}
Expand Down
4 changes: 2 additions & 2 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# KGraphQL version
version=0.19.0
version=0.20.0

# Dependencies
coroutine_version=1.6.4
Expand All @@ -8,7 +8,7 @@ caffeine_version=3.1.2
serialization_version=1.4.1
kDataLoader_version=0.5.1
deferredJsonBuilder_version=1.0.0
ktor_version=2.2.2
ktor_version=3.0.3

# Test-Dependencies
kotlin_html_version=0.7.5
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-7.5.1-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-7.6.3-all.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
2 changes: 1 addition & 1 deletion kgraphql-example/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
plugins {
base
application
kotlin("jvm") version "1.8.0"
kotlin("jvm") version "2.1.10"
id("org.jetbrains.dokka") version "1.7.20"
signing
}
Expand Down
4 changes: 2 additions & 2 deletions kgraphql-ktor/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
plugins {
base
kotlin("jvm") version "1.8.0"
kotlin("plugin.serialization") version "1.8.0"
kotlin("jvm") version "2.1.10"
kotlin("plugin.serialization") version "2.1.10"
id("org.jetbrains.dokka") version "1.7.20"
signing
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ class GraphQL(val schema: Schema) {
config.wrapWith?.invoke(this, routing) ?: routing(this)
}

pipeline.pluginOrNull(Routing)?.apply(routing) ?: pipeline.install(Routing, routing)
pipeline.pluginOrNull(RoutingRoot)?.apply(routing) ?: pipeline.install(RoutingRoot, routing)

pipeline.intercept(ApplicationCallPipeline.Monitoring) {
try {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package com.apurebase.kgraphql

import com.apurebase.kgraphql.schema.execution.Executor
import io.ktor.server.application.install
import io.ktor.server.application.plugin
import io.ktor.server.testing.*
import org.amshove.kluent.shouldBeEqualTo
import org.junit.jupiter.api.Test
Expand All @@ -11,24 +11,30 @@ class KtorConfigurationTest: KtorTest() {
@Test
fun `default configuration should`() {
var checked = false
withTestApplication({
val config = install(GraphQL) {}
testApplication {
install(GraphQL) {}
application {
val plugin = plugin(GraphQL)
plugin.schema.configuration.executor shouldBeEqualTo Executor.Parallel
}
checked = true
config.schema.configuration.executor shouldBeEqualTo Executor.Parallel
}) {}
}
checked shouldBeEqualTo true
}

@Test
fun `update configuration`() {
var checked = false
withTestApplication({
val config = install(GraphQL) {
testApplication {
install(GraphQL) {
executor = Executor.DataLoaderPrepared
}
application {
val plugin = plugin(GraphQL)
plugin.schema.configuration.executor shouldBeEqualTo Executor.DataLoaderPrepared
}
checked = true
config.schema.configuration.executor shouldBeEqualTo Executor.DataLoaderPrepared
}) {}
}
checked shouldBeEqualTo true
}

Expand Down
2 changes: 1 addition & 1 deletion kgraphql/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

plugins {
base
kotlin("jvm") version "1.8.0"
kotlin("jvm") version "2.1.10"
id("org.jetbrains.dokka") version "1.7.20"
signing
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -542,7 +542,7 @@ data class Lexer(
for (i in hex.length..3) {
append('0')
}
append(hex.toUpperCase())
append(hex.uppercase())
}
}
append("\"")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ enum class DirectiveLocation {
INLINE_FRAGMENT;

companion object {
fun from(str: String) = str.toLowerCase().let { lowered ->
values().firstOrNull { it.name.toLowerCase() == lowered }
fun from(str: String) = str.lowercase().let { lowered ->
values().firstOrNull { it.name.lowercase() == lowered }
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@ abstract class BaseSchemaTest {
ignore = true
}
transformation(Scenario::content) { content : String, uppercase: Boolean? ->
if(uppercase == true) content.toUpperCase() else content
if(uppercase == true) content.uppercase() else content
}
}
val favouriteID = unionType("Favourite") {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ class DeprecationSpecificationTest {
property<String>("add"){
description = expectedDescription
deprecate(expected)
resolver{ (content) -> content.toUpperCase() }
resolver{ (content) -> content.uppercase() }
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ class DocumentationSpecificationTest {
type<Sample>{
property<String>("add"){
description = expected
resolver{ (content) -> content.toUpperCase() }
resolver{ (content) -> content.uppercase() }
}
}
}
Expand Down