Skip to content

Commit 852ffa3

Browse files
authored
Update to kotlin 1.5 (#1176)
* Update to kotlin 1.5 * Fix client generation unit tests * Fix :graphql-kotlin-client-generator:test
1 parent 119250f commit 852ffa3

File tree

23 files changed

+38
-37
lines changed

23 files changed

+38
-37
lines changed

clients/graphql-kotlin-client-serialization/build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ tasks {
2020
limit {
2121
counter = "INSTRUCTION"
2222
value = "COVEREDRATIO"
23-
minimum = "0.77".toBigDecimal()
23+
minimum = "0.74".toBigDecimal()
2424
}
2525
}
2626
}

generator/graphql-kotlin-schema-generator/src/test/kotlin/com/expediagroup/graphql/generator/hooks/FlowSubscriptionSchemaGeneratorHooksTest.kt

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,27 +21,28 @@ import kotlinx.coroutines.flow.emptyFlow
2121
import org.junit.jupiter.api.Test
2222
import java.util.concurrent.CompletableFuture
2323
import kotlin.reflect.full.createType
24-
import kotlin.reflect.jvm.reflect
24+
import kotlin.reflect.jvm.ExperimentalReflectionOnLambdas
2525
import kotlin.test.assertEquals
2626
import kotlin.test.assertFalse
2727
import kotlin.test.assertNotNull
2828
import kotlin.test.assertTrue
2929

30+
@ExperimentalReflectionOnLambdas
3031
class FlowSubscriptionSchemaGeneratorHooksTest {
3132

3233
val hooks = FlowSubscriptionSchemaGeneratorHooks()
3334

3435
@Test
3536
fun `willResolveMonad unwraps Flow`() {
36-
val type = assertNotNull(TestQuery::getFlow.reflect()?.returnType)
37+
val type = assertNotNull(TestQuery::getFlow.returnType)
3738
val result = hooks.willResolveMonad(type)
3839
assertEquals(String::class.createType(), result)
3940
}
4041

4142
@Test
4243
fun `willResolveMonad does nothing on any other type`() {
43-
val stringType = assertNotNull(TestQuery::getString.reflect()?.returnType)
44-
val cfType = assertNotNull(TestQuery::getCompletableFuture.reflect()?.returnType)
44+
val stringType = assertNotNull(TestQuery::getString.returnType)
45+
val cfType = assertNotNull(TestQuery::getCompletableFuture.returnType)
4546

4647
assertEquals(stringType, hooks.willResolveMonad(stringType))
4748
assertEquals(cfType, hooks.willResolveMonad(cfType))

gradle.properties

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,16 +15,16 @@ org.gradle.jvmargs=-Xmx2g -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError
1515

1616
# dependencies
1717
kotlinJvmVersion = 1.8
18-
kotlinVersion = 1.4.32
19-
kotlinCoroutinesVersion = 1.4.3
20-
kotlinxSerializationVersion = 1.1.0
18+
kotlinVersion = 1.5.10
19+
kotlinCoroutinesVersion = 1.5.0
20+
kotlinxSerializationVersion = 1.2.1
2121

2222
classGraphVersion = 4.8.103
2323
federationGraphQLVersion = 0.6.3
2424
graphQLJavaVersion = 16.2
2525
jacksonVersion = 2.11.4
26-
kotlinPoetVersion = 1.7.2
27-
ktorVersion = 1.5.2
26+
kotlinPoetVersion = 1.8.0
27+
ktorVersion = 1.5.4
2828
reactorVersion = 3.4.4
2929
reactorExtensionsVersion = 1.1.3
3030
slf4jVersion = 1.7.30
@@ -42,7 +42,7 @@ wireMockVersion = 2.27.2
4242
# plugin versions
4343
detektVersion = 1.17.1
4444
dokkaVersion = 1.4.30
45-
jacocoVersion = 0.8.6
45+
jacocoVersion = 0.8.7
4646
ktlintVersion = 0.41.0
4747
ktlintPluginVersion = 10.0.0
4848
mavenPluginDevelopmentVersion = 0.3.1

plugins/client/graphql-kotlin-client-generator/src/test/data/generator/interface_diff_selection_sets/differentselectionsetquery/BasicInterface.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,12 @@ public interface BasicInterface {
2424
/**
2525
* Unique identifier of an interface
2626
*/
27-
public abstract val id: Int
27+
public val id: Int
2828

2929
/**
3030
* Name field
3131
*/
32-
public abstract val name: String
32+
public val name: String
3333
}
3434

3535
/**

plugins/client/graphql-kotlin-client-generator/src/test/data/generator/interface_diff_selection_sets/differentselectionsetquery/BasicInterface2.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ public interface BasicInterface2 {
2424
/**
2525
* Name field
2626
*/
27-
public abstract val name: String
27+
public val name: String
2828
}
2929

3030
/**

plugins/client/graphql-kotlin-client-generator/src/test/data/generator/interface_impl_diff_selection_sets/differentselectionsetquery/BasicInterface.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ public interface BasicInterface {
2323
/**
2424
* Unique identifier of an interface
2525
*/
26-
public abstract val id: Int
26+
public val id: Int
2727
}
2828

2929
/**

plugins/client/graphql-kotlin-client-generator/src/test/data/generator/interface_impl_diff_selection_sets/differentselectionsetquery/BasicInterface2.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ public interface BasicInterface2 {
2424
/**
2525
* Unique identifier of an interface
2626
*/
27-
public abstract val id: Int
27+
public val id: Int
2828
}
2929

3030
/**

plugins/client/graphql-kotlin-client-generator/src/test/data/generator/interface_named_fragments/interfacewithnamedfragmentsquery/BasicInterface.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,12 @@ public interface BasicInterface {
2424
/**
2525
* Unique identifier of an interface
2626
*/
27-
public abstract val id: Int
27+
public val id: Int
2828

2929
/**
3030
* Name field
3131
*/
32-
public abstract val name: String
32+
public val name: String
3333
}
3434

3535
/**

plugins/client/graphql-kotlin-client-generator/src/test/data/generator/object_diff_selection_set/differentselectionsquery/DetailsObject.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,5 +14,5 @@ public data class DetailsObject(
1414
/**
1515
* Actual detail value
1616
*/
17-
public val value: String
17+
public val `value`: String
1818
)

plugins/client/graphql-kotlin-client-generator/src/test/data/generator/object_diff_sub_selection/differentsubselectionquery/DetailsObject.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ public data class DetailsObject(
1515
/**
1616
* Actual detail value
1717
*/
18-
public val value: String,
18+
public val `value`: String,
1919
/**
2020
* Boolean flag
2121
*/

0 commit comments

Comments
 (0)