Skip to content

Commit 0e75d25

Browse files
committed
Upgrade to 1.5.30
Update Gradle to 6.9.1
1 parent f673bc2 commit 0e75d25

File tree

7 files changed

+116
-120
lines changed

7 files changed

+116
-120
lines changed

build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,14 +42,14 @@ buildscript {
4242
}
4343

4444
repositories {
45-
mavenLocal()
4645
maven { url 'https://maven.pkg.jetbrains.space/kotlin/p/dokka/dev' }
4746
// kotlin-dev with space redirector
4847
maven { url "https://cache-redirector.jetbrains.com/maven.pkg.jetbrains.space/kotlin/p/kotlin/dev" }
4948
mavenCentral()
5049
gradlePluginPortal()
5150
// For Dokka that depends on kotlinx-html
5251
maven { url "https://maven.pkg.jetbrains.space/public/p/kotlinx-html/maven" }
52+
mavenLocal()
5353
}
5454

5555
configurations.classpath {

gradle.properties

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@
55
group=org.jetbrains.kotlinx
66
version=1.3.0-SNAPSHOT
77

8-
kotlin.version=1.5.30-RC
8+
kotlin.version=1.5.30
99

1010
# This version take precedence if 'bootstrap' property passed to project
11-
kotlin.version.snapshot=1.5.255-SNAPSHOT
11+
kotlin.version.snapshot=1.6.255-SNAPSHOT
1212
# Also set KONAN_LOCAL_DIST environment variable in bootstrap mode to auto-assign konan.home
1313

1414
junit_version=4.12
Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,5 @@
1-
#
2-
# Copyright 2017-2021 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license.
3-
#
4-
51
distributionBase=GRADLE_USER_HOME
62
distributionPath=wrapper/dists
7-
distributionUrl=https\://services.gradle.org/distributions/gradle-6.7.1-all.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-6.9.1-all.zip
84
zipStoreBase=GRADLE_USER_HOME
95
zipStorePath=wrapper/dists

integration-test/gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# Copyright 2017-2020 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license.
33
#
44

5-
mainKotlinVersion=1.5.30-RC
5+
mainKotlinVersion=1.5.30
66
mainLibVersion=1.3.0-SNAPSHOT
77

88
kotlin.code.style=official

integration-test/settings.gradle

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ pluginManagement {
1717
mavenCentral()
1818
maven { url 'https://plugins.gradle.org/m2/' }
1919
maven { url "https://cache-redirector.jetbrains.com/maven.pkg.jetbrains.space/kotlin/p/kotlin/dev" }
20+
mavenLocal()
2021
}
2122
}
2223

integration-test/src/commonTest/kotlin/sample/MultiFileHierarchyModuleB.kt

Lines changed: 57 additions & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -3,62 +3,61 @@ package sample
33
import kotlinx.serialization.SerialName
44
import kotlinx.serialization.Serializable
55

6-
// TODO uncomment this classes and it's usage after fix https://youtrack.jetbrains.com/issue/KT-47161
7-
//@Serializable
8-
//class EmptyClassB : EmptyBase()
6+
@Serializable
7+
class EmptyClassB : EmptyBase()
98

10-
//
11-
//@Serializable
12-
//open class Car : Vehicle() {
13-
// var maxSpeed: Int = 100
14-
//
15-
// override fun equals(other: Any?): Boolean {
16-
// if (this === other) return true
17-
// if (other !is Car) return false
18-
// if (name != other.name) return false
19-
// if (color != other.color) return false
20-
// if (maxSpeed != other.maxSpeed) return false
21-
//
22-
// return true
23-
// }
24-
//
25-
// override fun hashCode(): Int {
26-
// return maxSpeed.hashCode()
27-
// }
28-
//
29-
// override fun toString(): String {
30-
// return "Car(name=$name, color=$color, maxSpeed=$maxSpeed)"
31-
// }
32-
//}
33-
//
34-
//@Serializable
35-
//data class TestSnippet(
36-
// @SerialName("experiments") val experiments: List<String>
37-
//) : Snippet("test", "aaa")
38-
//
39-
//@Serializable
40-
//data class ScreenSnippet(
41-
// @SerialName("name") val name: String,
42-
// @SerialName("uuid") val uuid: String? = null,
43-
// @SerialName("source") val source: String? = null
44-
//) : Snippet("screen", "aaa")
45-
//
46-
//@Serializable
47-
//class NotInConstructorTest : NotInConstructorBase() {
48-
// val c = "val c"
49-
//
50-
// override fun equals(other: Any?): Boolean {
51-
// if (this === other) return true
52-
// if (other !is NotInConstructorTest) return false
53-
//
54-
// if (a != other.a) return false
55-
// if (b != other.b) return false
56-
// if (c != other.c) return false
57-
//
58-
// return true
59-
// }
60-
//
61-
// override fun hashCode(): Int {
62-
// return a.hashCode() * 31 + b.hashCode() * 31 + c.hashCode()
63-
// }
64-
//}
9+
10+
@Serializable
11+
open class Car : Vehicle() {
12+
var maxSpeed: Int = 100
13+
14+
override fun equals(other: Any?): Boolean {
15+
if (this === other) return true
16+
if (other !is Car) return false
17+
if (name != other.name) return false
18+
if (color != other.color) return false
19+
if (maxSpeed != other.maxSpeed) return false
20+
21+
return true
22+
}
23+
24+
override fun hashCode(): Int {
25+
return maxSpeed.hashCode()
26+
}
27+
28+
override fun toString(): String {
29+
return "Car(name=$name, color=$color, maxSpeed=$maxSpeed)"
30+
}
31+
}
32+
33+
@Serializable
34+
data class TestSnippet(
35+
@SerialName("experiments") val experiments: List<String>
36+
) : Snippet("test", "aaa")
37+
38+
@Serializable
39+
data class ScreenSnippet(
40+
@SerialName("name") val name: String,
41+
@SerialName("uuid") val uuid: String? = null,
42+
@SerialName("source") val source: String? = null
43+
) : Snippet("screen", "aaa")
44+
45+
@Serializable
46+
class NotInConstructorTest : NotInConstructorBase() {
47+
val c = "val c"
48+
49+
override fun equals(other: Any?): Boolean {
50+
if (this === other) return true
51+
if (other !is NotInConstructorTest) return false
52+
53+
if (a != other.a) return false
54+
if (b != other.b) return false
55+
if (c != other.c) return false
56+
57+
return true
58+
}
59+
60+
override fun hashCode(): Int {
61+
return a.hashCode() * 31 + b.hashCode() * 31 + c.hashCode()
62+
}
63+
}

integration-test/src/commonTest/kotlin/sample/MultiFileHierarchyTest.kt

Lines changed: 53 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -20,57 +20,57 @@ class AbstractBaseTest {
2020
val parsed: EmptyClassA = Json.decodeFromString(EmptyClassA.serializer(), serialized)
2121
}
2222

23-
// @Test
24-
// fun stubConcreteClassTest() {
25-
// val concrete = EmptyClassB()
26-
// val serialized: String = Json.encodeToString(EmptyClassB.serializer(), concrete)
27-
// // to ensure that parsed without exceptions
28-
// val parsed: EmptyClassB = Json.decodeFromString(EmptyClassB.serializer(), serialized)
29-
// }
30-
//
31-
// @Test
32-
// fun testCrossModuleInheritance() {
33-
// val json = Json { allowStructuredMapKeys = true; encodeDefaults = true }
34-
//
35-
// val car = Car()
36-
// car.maxSpeed = 100
37-
// car.name = "ford"
38-
// val s = json.encodeToString(Car.serializer(), car)
39-
// assertEquals("""{"name":"ford","color":null,"maxSpeed":100}""", s)
40-
// val restoredCar = json.decodeFromString(Car.serializer(), s)
41-
// assertEquals(car, restoredCar)
42-
// }
43-
//
44-
// @Test
45-
// fun testCrossModuleAbstractInheritance() {
46-
// val snippetModule = SerializersModule {
47-
// polymorphic(Snippet::class) {
48-
// subclass(ScreenSnippet.serializer())
49-
// subclass(TestSnippet.serializer())
50-
// }
51-
// }
52-
//
53-
// val json = Json {
54-
// serializersModule = snippetModule
55-
// encodeDefaults = true
56-
// }
57-
//
58-
// val testSnippet = TestSnippet(emptyList())
59-
// val screenSnippet = ScreenSnippet("one", "two", "three")
60-
// val s = json.encodeToString(TestSnippet.serializer(), testSnippet)
61-
// assertEquals(testSnippet, json.decodeFromString(TestSnippet.serializer(), s))
62-
// assertEquals("""{"objectFieldName":"test","aaa":"aaa","experiments":[]}""",
63-
// json.encodeToString(TestSnippet.serializer(), testSnippet)
64-
// )
65-
// assertStringFormAndRestored("""{"objectFieldName":"screen","aaa":"aaa","name":"one","uuid":"two","source":"three"}""",
66-
// screenSnippet,
67-
// ScreenSnippet.serializer(),
68-
// json
69-
// )
70-
// }
71-
//
72-
// @Test
73-
// fun testPropertiesNotInConstructor() {
74-
// assertStringFormAndRestored("""{"b":"val b","a":"val a","c":"val c"}""", NotInConstructorTest(), NotInConstructorTest.serializer())
75-
// }
23+
@Test
24+
fun stubConcreteClassTest() {
25+
val concrete = EmptyClassB()
26+
val serialized: String = Json.encodeToString(EmptyClassB.serializer(), concrete)
27+
// to ensure that parsed without exceptions
28+
val parsed: EmptyClassB = Json.decodeFromString(EmptyClassB.serializer(), serialized)
29+
}
30+
31+
@Test
32+
fun testCrossModuleInheritance() {
33+
val json = Json { allowStructuredMapKeys = true; encodeDefaults = true }
34+
35+
val car = Car()
36+
car.maxSpeed = 100
37+
car.name = "ford"
38+
val s = json.encodeToString(Car.serializer(), car)
39+
assertEquals("""{"name":"ford","color":null,"maxSpeed":100}""", s)
40+
val restoredCar = json.decodeFromString(Car.serializer(), s)
41+
assertEquals(car, restoredCar)
42+
}
43+
44+
@Test
45+
fun testCrossModuleAbstractInheritance() {
46+
val snippetModule = SerializersModule {
47+
polymorphic(Snippet::class) {
48+
subclass(ScreenSnippet.serializer())
49+
subclass(TestSnippet.serializer())
50+
}
51+
}
52+
53+
val json = Json {
54+
serializersModule = snippetModule
55+
encodeDefaults = true
56+
}
57+
58+
val testSnippet = TestSnippet(emptyList())
59+
val screenSnippet = ScreenSnippet("one", "two", "three")
60+
val s = json.encodeToString(TestSnippet.serializer(), testSnippet)
61+
assertEquals(testSnippet, json.decodeFromString(TestSnippet.serializer(), s))
62+
assertEquals("""{"objectFieldName":"test","aaa":"aaa","experiments":[]}""",
63+
json.encodeToString(TestSnippet.serializer(), testSnippet)
64+
)
65+
assertStringFormAndRestored("""{"objectFieldName":"screen","aaa":"aaa","name":"one","uuid":"two","source":"three"}""",
66+
screenSnippet,
67+
ScreenSnippet.serializer(),
68+
json
69+
)
70+
}
71+
72+
@Test
73+
fun testPropertiesNotInConstructor() {
74+
assertStringFormAndRestored("""{"b":"val b","a":"val a","c":"val c"}""", NotInConstructorTest(), NotInConstructorTest.serializer())
75+
}
7676
}

0 commit comments

Comments
 (0)