Enable error loglevel for partial linkage messages (#2507)

The change is related to building serialization as a Kotlin user project. See https://youtrack.jetbrains.com/issue/QA-1115 for more details.
diff --git a/build.gradle b/build.gradle
index 983e791..207c115 100644
--- a/build.gradle
+++ b/build.gradle
@@ -168,6 +168,13 @@
         mavenLocal()
 
     }
+
+    tasks.withType(org.jetbrains.kotlin.gradle.tasks.Kotlin2JsCompile).configureEach {
+        compilerOptions { freeCompilerArgs.add("-Xpartial-linkage-loglevel=ERROR") }
+    }
+    tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinNativeCompile).configureEach {
+        compilerOptions { freeCompilerArgs.add("-Xpartial-linkage-loglevel=ERROR") }
+    }
 }
 
 def unpublishedProjects = ["benchmark", "guide", "kotlinx-serialization-json-tests"] as Set