From e4997cbc921ff879957e2d86753fa348e91e289b Mon Sep 17 00:00:00 2001 From: Paul Woitaschek Date: Sun, 10 Jul 2022 23:41:32 +0200 Subject: [PATCH] Use a map for the opt-in annotations. --- plugins/src/main/kotlin/ComposePlugin.kt | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/plugins/src/main/kotlin/ComposePlugin.kt b/plugins/src/main/kotlin/ComposePlugin.kt index fd90e8d3bf..1f280ca975 100644 --- a/plugins/src/main/kotlin/ComposePlugin.kt +++ b/plugins/src/main/kotlin/ComposePlugin.kt @@ -34,11 +34,12 @@ class ComposePlugin : Plugin { kotlinCompile.kotlinOptions { allWarningsAsErrors = true freeCompilerArgs = freeCompilerArgs + listOf( - "-opt-in=androidx.compose.material.ExperimentalMaterialApi", - "-opt-in=androidx.compose.animation.graphics.ExperimentalAnimationGraphicsApi", - "-opt-in=androidx.compose.material3.ExperimentalMaterial3Api", - "-opt-in=androidx.compose.foundation.ExperimentalFoundationApi", - ) + "androidx.compose.material.ExperimentalMaterialApi", + "androidx.compose.animation.graphics.ExperimentalAnimationGraphicsApi", + "androidx.compose.material3.ExperimentalMaterial3Api", + "androidx.compose.foundation.ExperimentalFoundationApi", + "androidx.compose.ui.ExperimentalComposeUiApi", + ).map { "-opt-in=$it" } } } }