Skip to content
Merged
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 clients/graphql-kotlin-client-jackson/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ tasks {
limit {
counter = "INSTRUCTION"
value = "COVEREDRATIO"
minimum = "0.89".toBigDecimal()
minimum = "0.85".toBigDecimal()
}
}
}
Expand Down
36 changes: 16 additions & 20 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,20 +6,18 @@ federation = "3.0.1"
graphql-java = "20.2"
graalvm = "0.9.21"
jackson = "2.15.0"
kotlin = "1.7.21"
# TODO kotlin 1.8 upgrade -> kotlinx-benchmark 0.4.7+ uses kotlin 1.8
kotlinx-benchmark = "0.4.6"
# TODO kotlin 1.8 upgrade -> kotlinx-coroutines 1.7.0+ uses kotlin 1.8
kotlinx-coroutines = "1.6.4"
# TODO kotlin 1.8 upgrade -> kotlinx-serialization 1.5.0+ uses kotlin 1.8
kotlinx-serialization = "1.4.1"
# TODO kotlin 1.8 upgrade -> ktor 2.3.0+ uses kotlin 1.8
ktor = "2.2.4"
# 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"
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.3"
maven-plugin-annotation = "3.9.0"
maven-plugin-api = "3.9.2"
maven-project = "2.2.1"
# TODO kotlin 1.8 upgrade -> kotlinpoet 1.13.0+ uses kotlin 1.8
poet = "1.12.0"
poet = "1.14.2"
## reactor and spring versions should be the same as defined in spring-boot-dependencies
reactor-core = "3.5.6"
reactor-extensions = "1.2.2"
Expand All @@ -28,22 +26,18 @@ spring = "6.0.9"
spring-boot = "3.1.0"

# test dependencies
# kotlin-compile-testing has to be using the same kotlin version as the kotlinx-serialization compiler
# https://github.com/tschuchortdev/kotlin-compile-testing the latest version targets kotlin 1.7.10 which blocks updates to newer
# versions of kotlin, switching to a fork https://github.com/ZacSweers/kotlin-compile-testing
compile-testing = "0.1.0"
compile-testing = "0.3.2"
icu = "73.1"
junit = "5.9.3"
logback = "1.4.7"
# TODO kotlin 1.8 upgrade -> mock 1.13.4+ uses kotlin 1.8
mockk = "1.13.3"
mockk = "1.13.7"
rxjava = "3.1.6"
wiremock = "2.35.0"

# plugins
# TODO kotlin 1.8 upgrade -> detekt 1.22.0+ uses kotlin 1.8
detekt = "1.21.0"
dokka = "1.7.20"
# TODO kotlin 1.9 upgrade -> detekt 1.23.1+ uses kotlin 1.9
detekt = "1.23.0"
dokka = "1.8.20"
jacoco = "0.8.10"
# klint gradle plugin breaks with 0.46.x+
ktlint-core = "0.45.2"
Expand Down Expand Up @@ -99,6 +93,8 @@ junit-api = { group = "org.junit.jupiter", name = "junit-jupiter-api", version.r
junit-engine = { group = "org.junit.jupiter", name = "junit-jupiter-engine", version.ref = "junit" }
junit-params = { group = "org.junit.jupiter", name = "junit-jupiter-params", version.ref = "junit" }
kotlin-junit-test = { group = "org.jetbrains.kotlin", name = "kotlin-test-junit5", version.ref = "kotlin" }
kotlin-annotation-processing = { group = "org.jetbrains.kotlin", name = "kotlin-annotation-processing-embeddable", version.ref = "kotlin" }
kotlin-compiler = { group = "org.jetbrains.kotlin", name = "kotlin-compiler-embeddable", version.ref = "kotlin" }
kotlin-test = { group = "org.jetbrains.kotlin", name = "kotlin-test", version.ref = "kotlin" }
kotlinx-benchmark = { group = "org.jetbrains.kotlinx", name = "kotlinx-benchmark-runtime", version.ref = "kotlinx-benchmark" }
kotlinx-coroutines-test = { group = "org.jetbrains.kotlinx", name = "kotlinx-coroutines-test", version.ref = "kotlinx-coroutines" }
Expand Down
14 changes: 11 additions & 3 deletions plugins/client/graphql-kotlin-client-generator/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -14,17 +14,25 @@ dependencies {
implementation(libs.jackson)
implementation(libs.ktor.client.apache)
implementation(libs.ktor.serialization.jackson) {
exclude("com.fasterxml.jackson.core", "jackson-databind")
exclude("com.fasterxml.jackson.module", "jackson-module-kotlin")
exclude(group = "com.fasterxml.jackson.core", module = "jackson-databind")
exclude(group = "com.fasterxml.jackson.module", module = "jackson-module-kotlin")
}
implementation(libs.ktor.client.content)
implementation(libs.slf4j)
testImplementation(projects.graphqlKotlinClientJackson)
testImplementation(projects.graphqlKotlinClientSerialization)
testImplementation(libs.wiremock.jre8)
testImplementation(libs.compile.testing)
testImplementation(libs.compile.testing) {
// there is no kotlin compile testing release supporting kotlin 1.8.22
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a workaround that should be removed once compatible version is available. Currently there is no release of kotlin-compile-testing that is compatible with kotlin version 1.8.22 :(

  • kotlin 1.8 compatible version is broken for compiler plugins (which we use) due to missing argument
  • we need version compatible with kotlin 1.8.20+ that includes a fix for a reflection bug
  • kotlin 1.9 compatible version fixes above issues .... but kotlin-serialization JARs are no longer published with shaded dependencies and we can no longer resolve the SerializationComponentRegistrar

Since there were no breaking API changes in the compile-testing library between the 1.8.22 and 1.9.0 versions, the simplest workaround for now is to explicitly exclude transitive compiler dependencies and explicitly include compatible versions.

// explicitly downgrading kotlin version to match project version
exclude(group = "org.jetbrains.kotlin", module = "kotlin-annotation-processing-embeddable")
exclude(group = "org.jetbrains.kotlin", module = "kotlin-compiler-embeddable")
}
testImplementation(libs.icu)
testImplementation(libs.junit.params)
// compile testing workaround -> explicit dependencies for compiler/annotation-processing
testImplementation(libs.kotlin.annotation.processing)
testImplementation(libs.kotlin.compiler)
testImplementation(libs.kotlin.serialization)
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ public const val ALIAS_QUERY: String =

@Generated
public class AliasQuery : GraphQLClientRequest<AliasQuery.Result> {
public override val query: String = ALIAS_QUERY
override val query: String = ALIAS_QUERY

public override val operationName: String = "AliasQuery"
override val operationName: String = "AliasQuery"

public override fun responseType(): KClass<AliasQuery.Result> = AliasQuery.Result::class
override fun responseType(): KClass<AliasQuery.Result> = AliasQuery.Result::class

@Generated
public data class Result(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,11 @@ public const val ALIAS_NESTED_QUERY: String =

@Generated
public class AliasNestedQuery : GraphQLClientRequest<AliasNestedQuery.Result> {
public override val query: String = ALIAS_NESTED_QUERY
override val query: String = ALIAS_NESTED_QUERY

public override val operationName: String = "AliasNestedQuery"
override val operationName: String = "AliasNestedQuery"

public override fun responseType(): KClass<AliasNestedQuery.Result> =
AliasNestedQuery.Result::class
override fun responseType(): KClass<AliasNestedQuery.Result> = AliasNestedQuery.Result::class

@Generated
public data class Result(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,11 @@ public const val DOCUMENTATION_QUERY: String =

@Generated
public class DocumentationQuery : GraphQLClientRequest<DocumentationQuery.Result> {
public override val query: String = DOCUMENTATION_QUERY
override val query: String = DOCUMENTATION_QUERY

public override val operationName: String = "DocumentationQuery"
override val operationName: String = "DocumentationQuery"

public override fun responseType(): KClass<DocumentationQuery.Result> =
DocumentationQuery.Result::class
override fun responseType(): KClass<DocumentationQuery.Result> = DocumentationQuery.Result::class

@Generated
public data class Result(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,13 @@ public const val INCLUDE_SKIP_DIRECTIVES_QUERY: String =

@Generated
public class IncludeSkipDirectivesQuery(
public override val variables: IncludeSkipDirectivesQuery.Variables,
override val variables: IncludeSkipDirectivesQuery.Variables,
) : GraphQLClientRequest<IncludeSkipDirectivesQuery.Result> {
public override val query: String = INCLUDE_SKIP_DIRECTIVES_QUERY
override val query: String = INCLUDE_SKIP_DIRECTIVES_QUERY

public override val operationName: String = "IncludeSkipDirectivesQuery"
override val operationName: String = "IncludeSkipDirectivesQuery"

public override fun responseType(): KClass<IncludeSkipDirectivesQuery.Result> =
override fun responseType(): KClass<IncludeSkipDirectivesQuery.Result> =
IncludeSkipDirectivesQuery.Result::class

@Generated
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ public const val HARD_CODED_INPUT_QUERY: String =

@Generated
public class HardCodedInputQuery : GraphQLClientRequest<HardCodedInputQuery.Result> {
public override val query: String = HARD_CODED_INPUT_QUERY
override val query: String = HARD_CODED_INPUT_QUERY

public override val operationName: String = "HardCodedInputQuery"
override val operationName: String = "HardCodedInputQuery"

public override fun responseType(): KClass<HardCodedInputQuery.Result> =
override fun responseType(): KClass<HardCodedInputQuery.Result> =
HardCodedInputQuery.Result::class

@Generated
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,13 @@ public const val INPUT_LIST_QUERY: String =

@Generated
public class InputListQuery(
public override val variables: InputListQuery.Variables,
override val variables: InputListQuery.Variables,
) : GraphQLClientRequest<InputListQuery.Result> {
public override val query: String = INPUT_LIST_QUERY
override val query: String = INPUT_LIST_QUERY

public override val operationName: String = "InputListQuery"
override val operationName: String = "InputListQuery"

public override fun responseType(): KClass<InputListQuery.Result> = InputListQuery.Result::class
override fun responseType(): KClass<InputListQuery.Result> = InputListQuery.Result::class

@Generated
public data class Variables(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,13 @@ public const val SELF_REFERENCING_INPUT_QUERY: String =

@Generated
public class SelfReferencingInputQuery(
public override val variables: SelfReferencingInputQuery.Variables,
override val variables: SelfReferencingInputQuery.Variables,
) : GraphQLClientRequest<SelfReferencingInputQuery.Result> {
public override val query: String = SELF_REFERENCING_INPUT_QUERY
override val query: String = SELF_REFERENCING_INPUT_QUERY

public override val operationName: String = "SelfReferencingInputQuery"
override val operationName: String = "SelfReferencingInputQuery"

public override fun responseType(): KClass<SelfReferencingInputQuery.Result> =
override fun responseType(): KClass<SelfReferencingInputQuery.Result> =
SelfReferencingInputQuery.Result::class

@Generated
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@ public const val DIFFERENT_SELECTION_SET_QUERY: String =

@Generated
public class DifferentSelectionSetQuery : GraphQLClientRequest<DifferentSelectionSetQuery.Result> {
public override val query: String = DIFFERENT_SELECTION_SET_QUERY
override val query: String = DIFFERENT_SELECTION_SET_QUERY

public override val operationName: String = "DifferentSelectionSetQuery"
override val operationName: String = "DifferentSelectionSetQuery"

public override fun responseType(): KClass<DifferentSelectionSetQuery.Result> =
override fun responseType(): KClass<DifferentSelectionSetQuery.Result> =
DifferentSelectionSetQuery.Result::class

@Generated
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,11 @@ public data class FirstInterfaceImplementation(
/**
* Unique identifier of the first implementation
*/
public override val id: Int,
override val id: Int,
/**
* Name of the first implementation
*/
public override val name: String,
override val name: String,
/**
* Custom field integer value
*/
Expand All @@ -62,11 +62,11 @@ public data class SecondInterfaceImplementation(
/**
* Unique identifier of the second implementation
*/
public override val id: Int,
override val id: Int,
/**
* Name of the second implementation
*/
public override val name: String,
override val name: String,
/**
* Custom field float value
*/
Expand All @@ -82,9 +82,9 @@ public data class DefaultBasicInterfaceImplementation(
/**
* Unique identifier of an interface
*/
public override val id: Int,
override val id: Int,
/**
* Name field
*/
public override val name: String,
override val name: String,
) : BasicInterface
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public data class FirstInterfaceImplementation2(
/**
* Name of the first implementation
*/
public override val name: String,
override val name: String,
/**
* Custom field integer value
*/
Expand All @@ -53,7 +53,7 @@ public data class SecondInterfaceImplementation2(
/**
* Name of the second implementation
*/
public override val name: String,
override val name: String,
/**
* Custom field float value
*/
Expand All @@ -69,5 +69,5 @@ public data class DefaultBasicInterface2Implementation(
/**
* Name field
*/
public override val name: String,
override val name: String,
) : BasicInterface2
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@ public const val DIFFERENT_SELECTION_SET_QUERY: String =

@Generated
public class DifferentSelectionSetQuery : GraphQLClientRequest<DifferentSelectionSetQuery.Result> {
public override val query: String = DIFFERENT_SELECTION_SET_QUERY
override val query: String = DIFFERENT_SELECTION_SET_QUERY

public override val operationName: String = "DifferentSelectionSetQuery"
override val operationName: String = "DifferentSelectionSetQuery"

public override fun responseType(): KClass<DifferentSelectionSetQuery.Result> =
override fun responseType(): KClass<DifferentSelectionSetQuery.Result> =
DifferentSelectionSetQuery.Result::class

@Generated
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public data class FirstInterfaceImplementation(
/**
* Unique identifier of the first implementation
*/
public override val id: Int,
override val id: Int,
/**
* Custom field integer value
*/
Expand All @@ -52,7 +52,7 @@ public data class SecondInterfaceImplementation(
/**
* Unique identifier of the second implementation
*/
public override val id: Int,
override val id: Int,
/**
* Custom field float value
*/
Expand All @@ -68,5 +68,5 @@ public data class DefaultBasicInterfaceImplementation(
/**
* Unique identifier of an interface
*/
public override val id: Int,
override val id: Int,
) : BasicInterface
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public data class FirstInterfaceImplementation2(
/**
* Unique identifier of the first implementation
*/
public override val id: Int,
override val id: Int,
/**
* Name of the first implementation
*/
Expand All @@ -57,7 +57,7 @@ public data class SecondInterfaceImplementation2(
/**
* Unique identifier of the second implementation
*/
public override val id: Int,
override val id: Int,
/**
* Name of the second implementation
*/
Expand All @@ -77,5 +77,5 @@ public data class DefaultBasicInterface2Implementation(
/**
* Unique identifier of an interface
*/
public override val id: Int,
override val id: Int,
) : BasicInterface2
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@ public const val INTERFACE_MISSING_TYPE_SELECTION: String =
@Generated
public class InterfaceMissingTypeSelection :
GraphQLClientRequest<InterfaceMissingTypeSelection.Result> {
public override val query: String = INTERFACE_MISSING_TYPE_SELECTION
override val query: String = INTERFACE_MISSING_TYPE_SELECTION

public override val operationName: String = "InterfaceMissingTypeSelection"
override val operationName: String = "InterfaceMissingTypeSelection"

public override fun responseType(): KClass<InterfaceMissingTypeSelection.Result> =
override fun responseType(): KClass<InterfaceMissingTypeSelection.Result> =
InterfaceMissingTypeSelection.Result::class

@Generated
Expand Down
Loading