Skip to content

Commit

Permalink
chore(deps): Update dependencies (#1974)
Browse files Browse the repository at this point in the history
### Updates
* Kotlin 1.8.22 to 1.9.24
* android-plugin 8.1.1 to 8.4.1
* classgraph 4.8.170 to 4.8.172
* compile-testing 0.3.2 to 0.4.1
* detekt 1.23.0 to 1.23.6
* dokka 1.8.20 to 1.9.20
* federation 4.4.1 to 5.0.0
* graalvm 0.10.1 to 0.10.2
* Gradle Wrapper (latest, no version shown)
* icu 74.2 to 75.2
* jackson 2.15.4 to 2.17.1
* kotlinx-benchmark 0.4.8 to 0.4.10
* kotlinx-coroutines 1.7.3 to 1.8.1
* kotlinx-serialization 1.5.1 to 1.6.3 **(3 test cases failing in
GenerateKotlinxClientIT)**
* ktlint-core 0.45.2 to 1.2.1 **(many rules had to be disabled, reformat
required)**
* ktlint-plugin 10.3.0 to 12.1.1
* ktor 2.3.10 to 2.3.11
* logback 1.5.4 to 1.5.6
* maven-plugin-annotation 3.12.0 to 3.13.0
* mockk 1.13.7 to 1.3.11
* nexus-publish-plugin 1.3.0 to 2.0.0
* poet 1.14.2 to 1.17.0
* reactor-core 3.5.15 to 3.6.6
* slf4j 2.0.12 to 2.0.13
* spring 6.0.18 to 6.1.8
* spring-boot 3.1.10 to 3.3.0
* wiremock 3.5.2 to 3.6.0

### Added
* spring-context (was needed for spring-web in
graphql-kotlin-spring-client)

### Improvements
* Synchronized all covered ratio values to current values
* Let Dependabot update GitHub Actions

### TODO
* Fix GraphQLTestUtils and GenerateKotlinxClientIT after Kotlin 1.9
upgrade
* Remove disabled rules in .editorconfig, then `./gradlew ktlintFormat`
  • Loading branch information
reneleonhardt committed Jun 24, 2024
1 parent 793c5ed commit 9d11d44
Show file tree
Hide file tree
Showing 26 changed files with 127 additions and 100 deletions.
40 changes: 37 additions & 3 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,41 @@ indent_size = 2
[*.{kt,kts}]
indent_size = 4
max_line_length = 200
#ktlint_disabled_rules=import-ordering,filename,no-empty-first-line-in-method-block,argument-list-wrapping,spacing-between-declarations-with-annotations,spacing-between-declarations-with-comments,enum-entry-name-case,trailing-comma-on-call-site,trailing-comma-on-declaration-site,package-name,annotation,multiline-if-else

# ktlint rules
# https://github.com/pinterest/ktlint/issues/527
disabled_rules=import-ordering
# TODO: Remove disabled rules then ./gradlew ktlintFormat
ktlint_standard_import-ordering = disabled
ktlint_standard_annotation = disabled
ktlint_standard_argument-list-wrapping = disabled
ktlint_standard_backing-property-naming = disabled
ktlint_standard_blank-line-before-declaration = disabled
ktlint_standard_class-naming = disabled
ktlint_standard_enum-entry-name-case = disabled
ktlint_standard_enum-wrapping = disabled
ktlint_standard_filename = disabled
ktlint_standard_function-naming = disabled
ktlint_standard_function-signature = disabled
ktlint_standard_if-else-bracing = disabled
ktlint_standard_if-else-wrapping = disabled
ktlint_standard_indent = disabled
ktlint_standard_multiline-expression-wrapping = disabled
ktlint_standard_multiline-if-else = disabled
ktlint_standard_no-blank-line-in-list = disabled
ktlint_standard_no-consecutive-comments = disabled
ktlint_standard_no-empty-first-line-in-class-body = disabled
ktlint_standard_no-empty-first-line-in-method-block = disabled
ktlint_standard_no-single-line-block-comment = disabled
ktlint_standard_package-name = disabled
ktlint_standard_parameter-list-wrapping = disabled
ktlint_standard_property-naming = disabled
ktlint_standard_spacing-between-declarations-with-annotations = disabled
ktlint_standard_spacing-between-declarations-with-comments = disabled
ktlint_standard_statement-wrapping = disabled
ktlint_standard_string-template-indent = disabled
ktlint_standard_trailing-comma-on-call-site = disabled
ktlint_standard_trailing-comma-on-declaration-site = disabled
# https://github.com/pinterest/ktlint/releases/tag/1.3.0
ktlint_standard_class-signature = disabled
ktlint_standard_chain-method-continuation = disabled
ktlint_standard_condition-wrapping = disabled
ktlint_standard_function-expression-body = disabled
5 changes: 5 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
version: 2
updates:
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"

- package-ecosystem: "gradle"
directory: "/"
labels:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ tasks {
counter = "INSTRUCTION"
value = "COVEREDRATIO"
// increase it when https://github.com/Kotlin/kotlinx.serialization/issues/961 is resolved
minimum = "0.70".toBigDecimal()
minimum = "0.79".toBigDecimal()
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ import com.expediagroup.graphql.client.serialization.types.KotlinxGraphQLError
import com.expediagroup.graphql.client.serialization.types.KotlinxGraphQLResponse
import com.expediagroup.graphql.client.serialization.types.KotlinxGraphQLSourceLocation
import com.expediagroup.graphql.client.serialization.types.OptionalInput
import kotlinx.serialization.decodeFromString
import kotlinx.serialization.json.Json
import kotlinx.serialization.json.JsonObject
import org.junit.jupiter.api.Test
Expand Down Expand Up @@ -309,8 +308,7 @@ class GraphQLClientKotlinXSerializerTest {
| "foo",
| null
| ],
| "nonNullableElementList": [
| ]
| "nonNullableElementList": []
| },
| "query": "INPUT_QUERY",
| "operationName": "InputQuery"
Expand All @@ -327,8 +325,7 @@ class GraphQLClientKotlinXSerializerTest {
)

val expected = """{
| "variables": {
| },
| "variables": {},
| "query": "EMPTY_INPUT_QUERY",
| "operationName": "EmptyInputQuery"
|}
Expand Down
2 changes: 1 addition & 1 deletion clients/graphql-kotlin-ktor-client/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ tasks {
limit {
counter = "INSTRUCTION"
value = "COVEREDRATIO"
minimum = "0.95".toBigDecimal()
minimum = "0.97".toBigDecimal()
}
}
}
Expand Down
3 changes: 2 additions & 1 deletion clients/graphql-kotlin-spring-client/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ dependencies {
api(projects.graphqlKotlinClientJackson)
api(libs.kotlinx.coroutines.reactor)
api(libs.spring.webflux)
api(libs.spring.context)
api(libs.spring.boot.netty)
testImplementation(projects.graphqlKotlinClientSerialization)
testImplementation(libs.wiremock.lib)
Expand All @@ -22,7 +23,7 @@ tasks {
limit {
counter = "INSTRUCTION"
value = "COVEREDRATIO"
minimum = "0.95".toBigDecimal()
minimum = "0.96".toBigDecimal()
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,12 @@ tasks {
limit {
counter = "INSTRUCTION"
value = "COVEREDRATIO"
minimum = "0.76".toBigDecimal()
minimum = "0.95".toBigDecimal()
}
limit {
counter = "BRANCH"
value = "COVEREDRATIO"
minimum = "0.50".toBigDecimal()
minimum = "0.90".toBigDecimal()
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,12 @@ tasks {
limit {
counter = "INSTRUCTION"
value = "COVEREDRATIO"
minimum = "0.92".toBigDecimal()
minimum = "0.94".toBigDecimal()
}
limit {
counter = "BRANCH"
value = "COVEREDRATIO"
minimum = "0.70".toBigDecimal()
minimum = "0.76".toBigDecimal()
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion executions/graphql-kotlin-dataloader/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ tasks {
limit {
counter = "INSTRUCTION"
value = "COVEREDRATIO"
minimum = "0.52".toBigDecimal()
minimum = "0.58".toBigDecimal()
}
limit {
counter = "BRANCH"
Expand Down
2 changes: 1 addition & 1 deletion generator/graphql-kotlin-federation/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ tasks {
limit {
counter = "BRANCH"
value = "COVEREDRATIO"
minimum = "0.80".toBigDecimal()
minimum = "0.83".toBigDecimal()
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,8 @@ schema {
query: Query
}
directive @custom on SCHEMA | SCALAR | OBJECT | FIELD_DEFINITION | ARGUMENT_DEFINITION | INTERFACE | UNION | ENUM | ENUM_VALUE | INPUT_OBJECT | INPUT_FIELD_DEFINITION
interface Product @extends @key(fields : "id") @key(fields : "upc") {
id: String! @external
reviews: [Review!]!
Expand All @@ -70,8 +72,8 @@ type Book implements Product @extends @key(fields : "id") @key(fields : "upc") {
type Query @extends
type Review {
body: String!
content: String
body: String! @custom
content: String @deprecated(reason : "no longer supported, replace with use Review.body instead")
customScalar: CustomScalar!
id: String!
}
Expand Down Expand Up @@ -173,7 +175,7 @@ type Query {
type Review {
body: String! @custom
content: String
content: String @deprecated(reason : "no longer supported, replace with use Review.body instead")
customScalar: CustomScalar!
id: String!
}
Expand Down
2 changes: 1 addition & 1 deletion generator/graphql-kotlin-schema-generator/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ tasks {
limit {
counter = "INSTRUCTION"
value = "COVEREDRATIO"
minimum = "0.95".toBigDecimal()
minimum = "0.96".toBigDecimal()
}
limit {
counter = "BRANCH"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,12 +69,10 @@ class OptionalInputTest {
Arguments.of("{ inputWithOptionalValues(input: { required: \"ABC\" }) }", "argument with optional object was not specified"),
Arguments.of("{ inputWithOptionalValues(input: { required: \"ABC\" optional: null }) }", "argument object value: null"),
Arguments.of("{ inputWithOptionalValues(input: { required: \"ABC\" optional: { id: 1, name: \"XYZ\" } }) }", "argument object value: SimpleArgument(id=1, name=XYZ)"),
/* ktlint-disable */
Arguments.of(
"{ inputWithNestedOptionalValues(input: { optional: { nestedOptionalScalar: \"ABC\", nestedOptionalInt: null } } )}",
"HasNestedOptionalArguments(optional=Defined(value=DeeplyNestedArguments(nestedOptional=UNDEFINED, nestedOptionalScalar=Defined(value=ABC), nestedOptionalInt=Defined(value=null))), optionalScalar=UNDEFINED)"
)
/* ktlint-enable */
)
}
}
Expand Down
64 changes: 29 additions & 35 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -1,53 +1,46 @@
[versions]
android-plugin = "8.1.1"
classgraph = "4.8.170"
android-plugin = "8.5.0"
classgraph = "4.8.174"
dataloader = "3.3.0"
federation = "4.4.1"
federation = "5.1.0"
graphql-java = "22.1"
graalvm = "0.10.1"
jackson = "2.15.4"
graalvm = "0.10.2"
jackson = "2.17.1"
# kotlin version has to match the compile-testing compiler version
kotlin = "1.8.22"
# TODO kotlin 1.9 upgrade -> kotlinx-benchaamrk 0.4.9+ uses kotlin 1.9
kotlinx-benchmark = "0.4.8"
# TODO kotlin 1.9 upgrade -> kotlinx-coroutines 1.8+ uses kotlin 1.9
kotlinx-coroutines = "1.7.3"
# TODO kotlin 1.9 upgrade -> kotlinx-serialization 1.6.0+ uses kotlin 1.9
kotlinx-serialization = "1.5.1"
ktor = "2.3.10"
maven-plugin-annotation = "3.12.0"
maven-plugin-api = "3.9.6"
kotlin = "1.9.24"
kotlinx-benchmark = "0.4.11"
kotlinx-coroutines = "1.8.1"
# TODO kotlin 1.9 upgrade: fix GraphQLTestUtils and GenerateKotlinxClientIT
kotlinx-serialization = "1.6.3"
ktor = "2.3.12"
maven-plugin-annotation = "3.13.1"
maven-plugin-api = "3.9.8"
maven-project = "2.2.1"
# TODO kotlin 1.9 upgrade -> kotlinxpoet 1.15+ uses kotlin 1.9
poet = "1.14.2"
poet = "1.17.0"
## reactor and spring versions should be the same as defined in spring-boot-dependencies
reactor-core = "3.5.15"
reactor-core = "3.6.7"
reactor-extensions = "1.2.2"
slf4j = "2.0.12"
spring = "6.0.18"
# TODO kotlin 1.9 upgrade -> spring boot 3.2+ uses kotlin 1.9
spring-boot = "3.1.10"
slf4j = "2.0.13"
spring = "6.1.10"
spring-boot = "3.3.1"

# test dependencies
compile-testing = "0.3.2"
icu = "74.2"
compile-testing = "0.5.0"
icu = "75.1"
junit = "5.10.2"
logback = "1.5.4"
# TODO kotlin 1.9 upgrade -> mockk 1.13.8+ uses kotlin 1.9
mockk = "1.13.7"
logback = "1.5.6"
mockk = "1.13.11"
rxjava = "3.1.8"
wiremock = "3.5.2"
wiremock = "3.6.0"

# plugins
# TODO kotlin 1.9 upgrade -> detekt 1.23.1+ uses kotlin 1.9
detekt = "1.23.0"
dokka = "1.8.20"
detekt = "1.23.6"
dokka = "1.9.20"
jacoco = "0.8.12"
# klint gradle plugin breaks with 0.46.x+
ktlint-core = "0.45.2"
ktlint-plugin = "10.3.0"
ktlint-core = "1.3.0"
ktlint-plugin = "12.1.1"
maven-plugin-development = "0.4.3"
nexus-publish-plugin = "1.3.0"
nexus-publish-plugin = "2.0.0"
plugin-publish = "1.2.1"

# ====================
Expand Down Expand Up @@ -89,6 +82,7 @@ spring-boot-config = { group = "org.springframework.boot", name = "spring-boot-c
spring-boot-netty = { group = "org.springframework.boot", name = "spring-boot-starter-reactor-netty", version.ref = "spring-boot" }
spring-boot-webflux = { group = "org.springframework.boot", name = "spring-boot-starter-webflux", version.ref = "spring-boot" }
spring-webflux = { group = "org.springframework", name = "spring-webflux", version.ref = "spring" }
spring-context = { group = "org.springframework", name = "spring-context", version.ref = "spring" }

# test dependencies
compile-testing = { group = "dev.zacsweers.kctfork", name = "core", version.ref = "compile-testing" }
Expand Down
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
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.8-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
Expand Down
19 changes: 10 additions & 9 deletions gradlew
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
# Darwin, MinGW, and NonStop.
#
# (3) This script is generated from the Groovy template
# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
# https://github.com/gradle/gradle/blob/HEAD/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
# within the Gradle project.
#
# You can find Gradle at https://github.com/gradle/gradle/.
Expand Down Expand Up @@ -83,7 +83,8 @@ done
# This is normally unused
# shellcheck disable=SC2034
APP_BASE_NAME=${0##*/}
APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit
# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit

# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD=maximum
Expand Down Expand Up @@ -144,15 +145,15 @@ if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
case $MAX_FD in #(
max*)
# In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked.
# shellcheck disable=SC3045
# shellcheck disable=SC2039,SC3045
MAX_FD=$( ulimit -H -n ) ||
warn "Could not query maximum file descriptor limit"
esac
case $MAX_FD in #(
'' | soft) :;; #(
*)
# In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked.
# shellcheck disable=SC3045
# shellcheck disable=SC2039,SC3045
ulimit -n "$MAX_FD" ||
warn "Could not set maximum file descriptor limit to $MAX_FD"
esac
Expand Down Expand Up @@ -201,11 +202,11 @@ fi
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'

# Collect all arguments for the java command;
# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of
# shell script including quotes and variable substitutions, so put them in
# double quotes to make sure that they get re-expanded; and
# * put everything else in single quotes, so that it's not re-expanded.
# Collect all arguments for the java command:
# * DEFAULT_JVM_OPTS, JAVA_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments,
# and any embedded shellness will be escaped.
# * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be
# treated as '${Hostname}' itself on the command line.

set -- \
"-Dorg.gradle.appname=$APP_BASE_NAME" \
Expand Down
Loading

0 comments on commit 9d11d44

Please sign in to comment.