diff --git a/examples/falling_balls/build.gradle.kts b/examples/falling_balls/build.gradle.kts index f93d7a3ff8..443bf513dc 100644 --- a/examples/falling_balls/build.gradle.kts +++ b/examples/falling_balls/build.gradle.kts @@ -24,6 +24,8 @@ dependencies { tasks.withType() { kotlinOptions.jvmTarget = "11" + kotlinOptions.allWarningsAsErrors = true + kotlinOptions.freeCompilerArgs += "-Xopt-in=kotlin.RequiresOptIn" } compose.desktop { diff --git a/examples/falling_balls/src/main/kotlin/main.kt b/examples/falling_balls/src/main/kotlin/main.kt index 430713379f..8b24707295 100644 --- a/examples/falling_balls/src/main/kotlin/main.kt +++ b/examples/falling_balls/src/main/kotlin/main.kt @@ -1,8 +1,6 @@ package org.jetbrains.compose.demo.falling -import androidx.compose.desktop.Window import androidx.compose.ui.ExperimentalComposeUiApi -import androidx.compose.ui.unit.IntSize import androidx.compose.ui.unit.dp import androidx.compose.ui.window.WindowSize import androidx.compose.ui.window.WindowState @@ -10,7 +8,8 @@ import androidx.compose.ui.window.singleWindowApplication @OptIn(ExperimentalComposeUiApi::class) fun main() = singleWindowApplication( - title = "Falling Balls", state = WindowState(size = WindowSize(800.dp, 800.dp))) { - FallingBallsGame() - } + title = "Falling Balls", state = WindowState(size = WindowSize(800.dp, 800.dp)) +) { + FallingBallsGame() +}