Upgrade to 1.5.30

Update Gradle to 6.9.1
diff --git a/build.gradle b/build.gradle
index 6a5707d..9f01044 100644
--- a/build.gradle
+++ b/build.gradle
@@ -42,7 +42,6 @@
     }
 
     repositories {
-        mavenLocal()
         maven { url 'https://maven.pkg.jetbrains.space/kotlin/p/dokka/dev' }
         // kotlin-dev with space redirector
         maven { url "https://cache-redirector.jetbrains.com/maven.pkg.jetbrains.space/kotlin/p/kotlin/dev" }
@@ -50,6 +49,7 @@
         gradlePluginPortal()
         // For Dokka that depends on kotlinx-html
         maven { url "https://maven.pkg.jetbrains.space/public/p/kotlinx-html/maven" }
+        mavenLocal()
     }
 
     configurations.classpath {
diff --git a/gradle.properties b/gradle.properties
index 3705efd..aeb11c7 100644
--- a/gradle.properties
+++ b/gradle.properties
@@ -5,10 +5,10 @@
 group=org.jetbrains.kotlinx
 version=1.3.0-SNAPSHOT
 
-kotlin.version=1.5.30-RC
+kotlin.version=1.5.30
 
 # This version take precedence if 'bootstrap' property passed to project
-kotlin.version.snapshot=1.5.255-SNAPSHOT
+kotlin.version.snapshot=1.6.255-SNAPSHOT
 # Also set KONAN_LOCAL_DIST environment variable in bootstrap mode to auto-assign konan.home
 
 junit_version=4.12
diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties
index e66b0d6..c19e35b 100644
--- a/gradle/wrapper/gradle-wrapper.properties
+++ b/gradle/wrapper/gradle-wrapper.properties
@@ -1,9 +1,5 @@
-#
-# Copyright 2017-2021 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license.
-#
-
 distributionBase=GRADLE_USER_HOME
 distributionPath=wrapper/dists
-distributionUrl=https\://services.gradle.org/distributions/gradle-6.7.1-all.zip
+distributionUrl=https\://services.gradle.org/distributions/gradle-6.9.1-all.zip
 zipStoreBase=GRADLE_USER_HOME
 zipStorePath=wrapper/dists
diff --git a/integration-test/gradle.properties b/integration-test/gradle.properties
index 1495d19..3b94c53 100644
--- a/integration-test/gradle.properties
+++ b/integration-test/gradle.properties
@@ -2,7 +2,7 @@
 # Copyright 2017-2020 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license.
 #
 
-mainKotlinVersion=1.5.30-RC
+mainKotlinVersion=1.5.30
 mainLibVersion=1.3.0-SNAPSHOT
 
 kotlin.code.style=official
diff --git a/integration-test/settings.gradle b/integration-test/settings.gradle
index 9063812..9410dc0 100644
--- a/integration-test/settings.gradle
+++ b/integration-test/settings.gradle
@@ -17,6 +17,7 @@
         mavenCentral()
         maven { url 'https://plugins.gradle.org/m2/' }
         maven { url "https://cache-redirector.jetbrains.com/maven.pkg.jetbrains.space/kotlin/p/kotlin/dev" }
+        mavenLocal()
     }
 }
 
diff --git a/integration-test/src/commonTest/kotlin/sample/MultiFileHierarchyModuleB.kt b/integration-test/src/commonTest/kotlin/sample/MultiFileHierarchyModuleB.kt
index 2091bbd..ea2426a 100644
--- a/integration-test/src/commonTest/kotlin/sample/MultiFileHierarchyModuleB.kt
+++ b/integration-test/src/commonTest/kotlin/sample/MultiFileHierarchyModuleB.kt
@@ -3,62 +3,61 @@
 import kotlinx.serialization.SerialName
 import kotlinx.serialization.Serializable
 
-// TODO uncomment this classes and it's usage after fix https://youtrack.jetbrains.com/issue/KT-47161
-//@Serializable
-//class EmptyClassB : EmptyBase()
+@Serializable
+class EmptyClassB : EmptyBase()
 
-//
-//@Serializable
-//open class Car : Vehicle() {
-//    var maxSpeed: Int = 100
-//
-//    override fun equals(other: Any?): Boolean {
-//        if (this === other) return true
-//        if (other !is Car) return false
-//        if (name != other.name) return false
-//        if (color != other.color) return false
-//        if (maxSpeed != other.maxSpeed) return false
-//
-//        return true
-//    }
-//
-//    override fun hashCode(): Int {
-//        return maxSpeed.hashCode()
-//    }
-//
-//    override fun toString(): String {
-//        return "Car(name=$name, color=$color, maxSpeed=$maxSpeed)"
-//    }
-//}
-//
-//@Serializable
-//data class TestSnippet(
-//    @SerialName("experiments") val experiments: List<String>
-//) : Snippet("test", "aaa")
-//
-//@Serializable
-//data class ScreenSnippet(
-//    @SerialName("name") val name: String,
-//    @SerialName("uuid") val uuid: String? = null,
-//    @SerialName("source") val source: String? = null
-//) : Snippet("screen", "aaa")
-//
-//@Serializable
-//class NotInConstructorTest : NotInConstructorBase() {
-//    val c = "val c"
-//
-//    override fun equals(other: Any?): Boolean {
-//        if (this === other) return true
-//        if (other !is NotInConstructorTest) return false
-//
-//        if (a != other.a) return false
-//        if (b != other.b) return false
-//        if (c != other.c) return false
-//
-//        return true
-//    }
-//
-//    override fun hashCode(): Int {
-//        return a.hashCode() * 31 + b.hashCode() * 31 + c.hashCode()
-//    }
-//}
+
+@Serializable
+open class Car : Vehicle() {
+    var maxSpeed: Int = 100
+
+    override fun equals(other: Any?): Boolean {
+        if (this === other) return true
+        if (other !is Car) return false
+        if (name != other.name) return false
+        if (color != other.color) return false
+        if (maxSpeed != other.maxSpeed) return false
+
+        return true
+    }
+
+    override fun hashCode(): Int {
+        return maxSpeed.hashCode()
+    }
+
+    override fun toString(): String {
+        return "Car(name=$name, color=$color, maxSpeed=$maxSpeed)"
+    }
+}
+
+@Serializable
+data class TestSnippet(
+    @SerialName("experiments") val experiments: List<String>
+) : Snippet("test", "aaa")
+
+@Serializable
+data class ScreenSnippet(
+    @SerialName("name") val name: String,
+    @SerialName("uuid") val uuid: String? = null,
+    @SerialName("source") val source: String? = null
+) : Snippet("screen", "aaa")
+
+@Serializable
+class NotInConstructorTest : NotInConstructorBase() {
+    val c = "val c"
+
+    override fun equals(other: Any?): Boolean {
+        if (this === other) return true
+        if (other !is NotInConstructorTest) return false
+
+        if (a != other.a) return false
+        if (b != other.b) return false
+        if (c != other.c) return false
+
+        return true
+    }
+
+    override fun hashCode(): Int {
+        return a.hashCode() * 31 + b.hashCode() * 31 + c.hashCode()
+    }
+}
diff --git a/integration-test/src/commonTest/kotlin/sample/MultiFileHierarchyTest.kt b/integration-test/src/commonTest/kotlin/sample/MultiFileHierarchyTest.kt
index d687d97..d3bddfa 100644
--- a/integration-test/src/commonTest/kotlin/sample/MultiFileHierarchyTest.kt
+++ b/integration-test/src/commonTest/kotlin/sample/MultiFileHierarchyTest.kt
@@ -20,57 +20,57 @@
         val parsed: EmptyClassA = Json.decodeFromString(EmptyClassA.serializer(), serialized)
     }
 
-//    @Test
-//    fun stubConcreteClassTest() {
-//        val concrete = EmptyClassB()
-//        val serialized: String = Json.encodeToString(EmptyClassB.serializer(), concrete)
-//        // to ensure that parsed without exceptions
-//        val parsed: EmptyClassB = Json.decodeFromString(EmptyClassB.serializer(), serialized)
-//    }
-//
-//    @Test
-//    fun testCrossModuleInheritance() {
-//        val json = Json { allowStructuredMapKeys = true; encodeDefaults = true }
-//
-//        val car = Car()
-//        car.maxSpeed = 100
-//        car.name = "ford"
-//        val s = json.encodeToString(Car.serializer(), car)
-//        assertEquals("""{"name":"ford","color":null,"maxSpeed":100}""", s)
-//        val restoredCar = json.decodeFromString(Car.serializer(), s)
-//        assertEquals(car, restoredCar)
-//    }
-//
-//    @Test
-//    fun testCrossModuleAbstractInheritance() {
-//        val snippetModule = SerializersModule {
-//            polymorphic(Snippet::class) {
-//                subclass(ScreenSnippet.serializer())
-//                subclass(TestSnippet.serializer())
-//            }
-//        }
-//
-//        val json = Json {
-//            serializersModule = snippetModule
-//            encodeDefaults = true
-//        }
-//
-//        val testSnippet = TestSnippet(emptyList())
-//        val screenSnippet = ScreenSnippet("one", "two", "three")
-//        val s = json.encodeToString(TestSnippet.serializer(), testSnippet)
-//        assertEquals(testSnippet, json.decodeFromString(TestSnippet.serializer(), s))
-//        assertEquals("""{"objectFieldName":"test","aaa":"aaa","experiments":[]}""",
-//            json.encodeToString(TestSnippet.serializer(), testSnippet)
-//        )
-//        assertStringFormAndRestored("""{"objectFieldName":"screen","aaa":"aaa","name":"one","uuid":"two","source":"three"}""",
-//            screenSnippet,
-//            ScreenSnippet.serializer(),
-//            json
-//        )
-//    }
-//
-//    @Test
-//    fun testPropertiesNotInConstructor() {
-//        assertStringFormAndRestored("""{"b":"val b","a":"val a","c":"val c"}""", NotInConstructorTest(), NotInConstructorTest.serializer())
-//    }
+    @Test
+    fun stubConcreteClassTest() {
+        val concrete = EmptyClassB()
+        val serialized: String = Json.encodeToString(EmptyClassB.serializer(), concrete)
+        // to ensure that parsed without exceptions
+        val parsed: EmptyClassB = Json.decodeFromString(EmptyClassB.serializer(), serialized)
+    }
+
+    @Test
+    fun testCrossModuleInheritance() {
+        val json = Json { allowStructuredMapKeys = true; encodeDefaults = true }
+
+        val car = Car()
+        car.maxSpeed = 100
+        car.name = "ford"
+        val s = json.encodeToString(Car.serializer(), car)
+        assertEquals("""{"name":"ford","color":null,"maxSpeed":100}""", s)
+        val restoredCar = json.decodeFromString(Car.serializer(), s)
+        assertEquals(car, restoredCar)
+    }
+
+    @Test
+    fun testCrossModuleAbstractInheritance() {
+        val snippetModule = SerializersModule {
+            polymorphic(Snippet::class) {
+                subclass(ScreenSnippet.serializer())
+                subclass(TestSnippet.serializer())
+            }
+        }
+
+        val json = Json {
+            serializersModule = snippetModule
+            encodeDefaults = true
+        }
+
+        val testSnippet = TestSnippet(emptyList())
+        val screenSnippet = ScreenSnippet("one", "two", "three")
+        val s = json.encodeToString(TestSnippet.serializer(), testSnippet)
+        assertEquals(testSnippet, json.decodeFromString(TestSnippet.serializer(), s))
+        assertEquals("""{"objectFieldName":"test","aaa":"aaa","experiments":[]}""",
+            json.encodeToString(TestSnippet.serializer(), testSnippet)
+        )
+        assertStringFormAndRestored("""{"objectFieldName":"screen","aaa":"aaa","name":"one","uuid":"two","source":"three"}""",
+            screenSnippet,
+            ScreenSnippet.serializer(),
+            json
+        )
+    }
+
+    @Test
+    fun testPropertiesNotInConstructor() {
+        assertStringFormAndRestored("""{"b":"val b","a":"val a","c":"val c"}""", NotInConstructorTest(), NotInConstructorTest.serializer())
+    }
 }