Skip to content

Commit

Permalink
Serialization integration tests 1.6 (#2294)
Browse files Browse the repository at this point in the history
* Update kotlinx.serialization submodule to 1.3.2

* Update serialization.diff for serialization 1.3.2

* Update Kotlin to 1.6.10 for serialization integration tests
  • Loading branch information
IgnatBeresnev authored Dec 29, 2021
1 parent a9283f3 commit b8ffe63
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 62 deletions.
Submodule kotlinx-serialization updated 53 files
+34 −0 CHANGELOG.md
+12 −12 README.md
+5 −0 build.gradle
+8 −0 core/api/kotlinx-serialization-core.api
+2 −1 core/commonMain/src/kotlinx/serialization/descriptors/ContextAware.kt
+29 −0 core/commonMain/src/kotlinx/serialization/encoding/Encoding.kt
+15 −15 core/commonMain/src/kotlinx/serialization/internal/CollectionSerializers.kt
+42 −9 core/commonMain/src/kotlinx/serialization/modules/PolymorphicModuleBuilder.kt
+26 −9 core/commonMain/src/kotlinx/serialization/modules/SerializersModule.kt
+42 −11 core/commonMain/src/kotlinx/serialization/modules/SerializersModuleBuilders.kt
+37 −4 core/commonMain/src/kotlinx/serialization/modules/SerializersModuleCollector.kt
+43 −0 core/commonTest/src/kotlinx/serialization/SealedGenericClassesTest.kt
+3 −3 core/commonTest/src/kotlinx/serialization/modules/ModuleBuildersTest.kt
+8 −6 docs/basic-serialization.md
+8 −4 docs/builtin-classes.md
+46 −34 docs/formats.md
+21 −13 docs/inline-classes.md
+52 −46 docs/json.md
+126 −18 docs/polymorphism.md
+1 −0 docs/serialization-guide.md
+56 −44 docs/serializers.md
+4 −1 formats/hocon/api/kotlinx-serialization-hocon.api
+3 −11 formats/hocon/build.gradle
+91 −64 formats/hocon/src/main/kotlin/kotlinx/serialization/hocon/Hocon.kt
+140 −0 formats/hocon/src/main/kotlin/kotlinx/serialization/hocon/HoconEncoder.kt
+22 −0 formats/hocon/src/main/kotlin/kotlinx/serialization/hocon/HoconExceptions.kt
+20 −0 formats/hocon/src/main/kotlin/kotlinx/serialization/hocon/HoconSerialKind.kt
+13 −0 formats/hocon/src/main/kotlin/kotlinx/serialization/hocon/NamingConvention.kt
+172 −0 formats/hocon/src/test/kotlin/kotlinx/serialization/hocon/HoconEncoderTest.kt
+39 −3 formats/hocon/src/test/kotlin/kotlinx/serialization/hocon/HoconNamingConventionTest.kt
+39 −87 formats/hocon/src/test/kotlin/kotlinx/serialization/hocon/HoconPolymorphismTest.kt
+20 −6 formats/hocon/src/test/kotlin/kotlinx/serialization/hocon/HoconRootObjectsTest.kt
+24 −0 formats/hocon/src/test/kotlin/kotlinx/serialization/hocon/HoconTesting.kt
+56 −0 formats/hocon/src/test/kotlin/kotlinx/serialization/hocon/HoconValuesTest.kt
+1 −1 formats/json/commonMain/src/kotlinx/serialization/json/Json.kt
+6 −4 formats/json/commonMain/src/kotlinx/serialization/json/internal/JsonTreeReader.kt
+9 −2 formats/json/commonMain/src/kotlinx/serialization/json/internal/PolymorphismValidator.kt
+5 −2 formats/json/commonMain/src/kotlinx/serialization/json/internal/TreeJsonEncoder.kt
+5 −5 formats/json/commonMain/src/kotlinx/serialization/json/internal/WriteMode.kt
+27 −0 formats/json/commonTest/src/kotlinx/serialization/EncodingCollectionsTest.kt
+2 −0 formats/json/commonTest/src/kotlinx/serialization/PolymorphismTestData.kt
+54 −7 formats/json/commonTest/src/kotlinx/serialization/features/PolymorphismTest.kt
+53 −3 formats/json/commonTest/src/kotlinx/serialization/features/inline/InlineClassesTest.kt
+28 −0 formats/json/jvmTest/src/kotlinx/serialization/features/JsonStreamFlowTest.kt
+5 −5 gradle.properties
+10 −6 gradle/dokka.gradle
+9 −7 gradle/kover.gradle
+1 −1 guide/example/example-builtin-04.kt
+1 −1 guide/example/example-poly-19.kt
+74 −0 guide/example/example-poly-20.kt
+7 −0 guide/test/PolymorphismTest.kt
+2 −2 integration-test/gradle.properties
+1 −1 integration-test/src/commonTest/kotlin/sample/MultiFileHierarchyModuleB.kt
75 changes: 15 additions & 60 deletions integration-tests/gradle/projects/serialization/serialization.diff
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
diff --git a/build.gradle b/build.gradle
index 23537170..50672336 100644
index 845f7e4e..b3145969 100644
--- a/build.gradle
+++ b/build.gradle
@@ -64,7 +64,6 @@ buildscript {
Expand All @@ -21,78 +21,33 @@ index 23537170..50672336 100644
// To make it visible for compiler-version.gradle
ext.compilerVersion = org.jetbrains.kotlin.config.KotlinCompilerVersion.VERSION
ext.nativeDebugBuild = org.jetbrains.kotlin.gradle.plugin.mpp.NativeBuildType.DEBUG
@@ -182,3 +185,5 @@ subprojects {
@@ -99,7 +102,6 @@ knit {
// Build API docs for all modules with dokka before running Knit
knitPrepare.dependsOn "dokka"

-apply plugin: 'org.jetbrains.dokka'
dependencies {
dokkaPlugin("org.jetbrains.kotlinx:dokka-pathsaver-plugin:$knit_version")
}
@@ -187,3 +189,5 @@ subprojects {
apply from: rootProject.file('gradle/compiler-version.gradle')
apply from: rootProject.file("gradle/dokka.gradle")
apply from: rootProject.file("gradle/benchmark-parsing.gradle")
+
+apply from: "../template.root.gradle.kts"
\ No newline at end of file
+
diff --git a/gradle.properties b/gradle.properties
index 4335988b..e642bdd5 100644
index 05428604..b4c7b3d1 100644
--- a/gradle.properties
+++ b/gradle.properties
@@ -13,7 +13,7 @@ kotlin.version.snapshot=1.6.255-SNAPSHOT

junit_version=4.12
jackson_version=2.10.0.pr1
-dokka_version=1.4.20-multimodule-dev-7
+dokka_version=1.5.31-SNAPSHOT
-dokka_version=1.6.0
+dokka_version=for-integration-tests-SNAPSHOT
native.deploy=
validator_version=0.7.1
knit_version=0.2.2
diff --git a/gradle/dokka.gradle b/gradle/dokka.gradle
index 5b8c66a8..cb697c92 100644
--- a/gradle/dokka.gradle
+++ b/gradle/dokka.gradle
@@ -14,41 +14,41 @@ def documentedSubprojects = ["kotlinx-serialization-core",
subprojects {
if (!(name in documentedSubprojects)) return
apply plugin: 'org.jetbrains.dokka'
- tasks.named('dokkaHtml') {
+ tasks.named('dokkaHtmlPartial') {
outputDirectory = file("build/dokka")
dokkaSourceSets {
configureEach {
includes.from(rootProject.file('dokka/moduledoc.md').path)

perPackageOption {
- prefix.set("kotlinx.serialization")
+ matchingRegex.set("kotlinx.serialization(\$|\\.).*")
reportUndocumented.set(true)
skipDeprecated.set(true)
}

// Internal API
perPackageOption {
- prefix.set("kotlinx.serialization.internal")
+ matchingRegex.set("kotlinx.serialization.internal(\$|\\.).*")
suppress.set(true)
}

// Workaround for typealias
perPackageOption {
- prefix.set("kotlinx.serialization.protobuf.internal")
+ matchingRegex.set("kotlinx.serialization.protobuf.internal(\$|\\.).*")
suppress.set(true)
reportUndocumented.set(false)
}

// Deprecated migrations
perPackageOption {
- prefix.set("kotlinx.protobuf")
+ matchingRegex.set("kotlinx.protobuf(\$|\\.).*")
reportUndocumented.set(true)
skipDeprecated.set(true)
}

// Deprecated migrations
perPackageOption {
- prefix.set("org.jetbrains.kotlinx.serialization.config")
+ matchingRegex.set("org.jetbrains.kotlinx.serialization.config(\$|\\.).*")
reportUndocumented.set(false)
skipDeprecated.set(true)
}
knit_version=0.3.0
diff --git a/settings.gradle b/settings.gradle
index 27933950..6a6fc80a 100644
--- a/settings.gradle
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ class SerializationGradleIntegrationTest(override val versions: BuildVersions) :
@get:Parameterized.Parameters(name = "{0}")
val versions = BuildVersions.permutations(
gradleVersions = listOf("6.9.1"),
kotlinVersions = listOf("1.5.31")
kotlinVersions = listOf("1.6.10")
)
}

Expand Down

0 comments on commit b8ffe63

Please sign in to comment.