Skip to content

Commit 2616a9d

Browse files
committed
Fix several build warnings
- Opt-in to expect-actual classes experimental feature - Suppress default hierarchy template warning - Remove obsolete kotlin.Experimental opt-in
1 parent 5def197 commit 2616a9d

File tree

4 files changed

+7
-4
lines changed

4 files changed

+7
-4
lines changed

core/build.gradle.kts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import javax.xml.parsers.DocumentBuilderFactory
55
import java.io.ByteArrayOutputStream
66
import java.io.PrintWriter
77
import org.jetbrains.dokka.gradle.AbstractDokkaLeafTask
8+
import org.jetbrains.kotlin.gradle.ExperimentalKotlinGradlePluginApi
89

910
plugins {
1011
kotlin("multiplatform")
@@ -116,6 +117,11 @@ kotlin {
116117
}
117118
}
118119

120+
@OptIn(ExperimentalKotlinGradlePluginApi::class)
121+
compilerOptions {
122+
freeCompilerArgs.add("-Xexpect-actual-classes")
123+
}
124+
119125
sourceSets.all {
120126
val suffixIndex = name.indexOfLast { it.isUpperCase() }
121127
val targetName = name.substring(0, suffixIndex)

core/native/src/Parser.kt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@ internal fun <T, S> Parser<T>.chainIgnoring(other: Parser<S>): Parser<T> =
3232
internal fun <T, S> Parser<T>.chainSkipping(other: Parser<S>): Parser<S> =
3333
chain(other).map { (_, s) -> s }
3434

35-
@SharedImmutable
3635
internal val eofParser: Parser<Unit> = { str, pos ->
3736
if (str.length > pos) {
3837
throw parseException("extraneous input", pos)

gradle.properties

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ java.modularToolchainVersion=11
1515
kotlin.js.compiler=ir
1616
kotlin.native.ignoreIncorrectDependencies=true
1717
kotlin.native.ignoreDisabledTargets=true
18+
kotlin.mpp.applyDefaultHierarchyTemplate=false
1819

1920
# Workaround for Bintray treating .sha512 files as artifacts
2021
# https://github.com/gradle/gradle/issues/11412

serialization/build.gradle.kts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -63,9 +63,6 @@ kotlin {
6363
val suffix = name.substring(suffixIndex).toLowerCase(Locale.ROOT).takeIf { it != "main" }
6464
kotlin.srcDir("$targetName/${suffix ?: "src"}")
6565
resources.srcDir("$targetName/${suffix?.let { it + "Resources" } ?: "resources"}")
66-
languageSettings {
67-
optIn("kotlin.Experimental")
68-
}
6966
}
7067

7168
targets.withType<org.jetbrains.kotlin.gradle.plugin.mpp.KotlinNativeTarget> {

0 commit comments

Comments
 (0)