From 0ed5aa650a37d22cae7227507d61acebf912d3c3 Mon Sep 17 00:00:00 2001 From: Nikolay Igotti Date: Tue, 27 Jul 2021 16:42:25 +0300 Subject: [PATCH] Cleanup warnings, make them errors. --- examples/falling_balls/build.gradle.kts | 2 ++ examples/falling_balls/src/main/kotlin/main.kt | 9 ++++----- 2 files changed, 6 insertions(+), 5 deletions(-) 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() +}