Skip to content

Commit

Permalink
Remove most common build warning from skiko
Browse files Browse the repository at this point in the history
* Argument -Xopt-in is deprecated. Please use -opt-in instead
* 'expect'/'actual' classes (including interfaces, objects, annotations, enums, and 'actual' typealiases) are in Beta
  • Loading branch information
Schahen authored Dec 15, 2023
1 parent dcbac74 commit 70282bd
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion samples/SkiaAwtSample/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -83,5 +83,5 @@ tasks.register("runInterop") {
}

tasks.withType<KotlinCompile>().configureEach {
kotlinOptions.freeCompilerArgs += "-Xopt-in=kotlin.RequiresOptIn"
kotlinOptions.freeCompilerArgs += "-opt-in=kotlin.RequiresOptIn"
}
2 changes: 1 addition & 1 deletion samples/SkiaMultiplatformSample/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -341,6 +341,6 @@ fun KotlinNativeTarget.configureToLaunchFromXcode() {

tasks.withType<org.jetbrains.kotlin.gradle.tasks.KotlinNativeCompile>().configureEach {
kotlinOptions {
freeCompilerArgs += "-Xopt-in=kotlinx.cinterop.ExperimentalForeignApi"
freeCompilerArgs += "-opt-in=kotlinx.cinterop.ExperimentalForeignApi"
}
}
6 changes: 5 additions & 1 deletion skiko/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -557,5 +557,9 @@ tasks.findByName("publishSkikoWasmRuntimePublicationToComposeRepoRepository")
tasks.withType<org.jetbrains.kotlin.gradle.tasks.KotlinNativeCompile>().configureEach {
// https://youtrack.jetbrains.com/issue/KT-56583
compilerOptions.freeCompilerArgs.add("-XXLanguage:+ImplicitSignedToUnsignedIntegerConversion")
kotlinOptions.freeCompilerArgs += "-Xopt-in=kotlinx.cinterop.ExperimentalForeignApi"
kotlinOptions.freeCompilerArgs += "-opt-in=kotlinx.cinterop.ExperimentalForeignApi"
}

tasks.withType<org.jetbrains.kotlin.gradle.dsl.KotlinCompile<*>>().configureEach {
kotlinOptions.freeCompilerArgs += "-Xexpect-actual-classes"
}

0 comments on commit 70282bd

Please sign in to comment.