From 455f11bc0a94e03c13c73beaf8321565c547a018 Mon Sep 17 00:00:00 2001 From: Oleksandr Karpovich Date: Mon, 9 Dec 2024 12:16:26 +0100 Subject: [PATCH] Use the compiler plugin features flags instead of the deprecated flags (#1710) The old flags were deprecated and we see a printed warning: > w: nonSkippingGroupOptimization is deprecated. Use plugin:androidx.compose.compiler.plugins.kotlin:featureFlag=OptimizeNonSkippingGroups instead w: experimentalStrongSkipping is deprecated. Use plugin:androidx.compose.compiler.plugins.kotlin:featureFlag=StrongSkipping instead --- .../kotlin/androidx/build/AndroidXComposeImplPlugin.kt | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/buildSrc/private/src/main/kotlin/androidx/build/AndroidXComposeImplPlugin.kt b/buildSrc/private/src/main/kotlin/androidx/build/AndroidXComposeImplPlugin.kt index 11a3d176d58cf..d7a20d8152ebb 100644 --- a/buildSrc/private/src/main/kotlin/androidx/build/AndroidXComposeImplPlugin.kt +++ b/buildSrc/private/src/main/kotlin/androidx/build/AndroidXComposeImplPlugin.kt @@ -58,9 +58,9 @@ const val composeReportsOption = const val enableMetricsArg = "androidx.enableComposeCompilerMetrics" const val enableReportsArg = "androidx.enableComposeCompilerReports" const val composeStrongSkippingOption = - "plugin:androidx.compose.compiler.plugins.kotlin:strongSkipping" + "plugin:androidx.compose.compiler.plugins.kotlin:featureFlag=StrongSkipping" const val composeNonSkippingGroupOptimizationOption = - "plugin:androidx.compose.compiler.plugins.kotlin:nonSkippingGroupOptimization" + "plugin:androidx.compose.compiler.plugins.kotlin:featureFlag=OptimizeNonSkippingGroups" /** * Plugin to apply common configuration for Compose projects. @@ -416,10 +416,10 @@ private fun configureComposeCompilerPlugin( // Enable Compose strong skipping mode compile.compilerOptions.freeCompilerArgs.addAll( - listOf("-P", "$composeStrongSkippingOption=true") + listOf("-P", composeStrongSkippingOption) ) compile.compilerOptions.freeCompilerArgs.addAll( - listOf("-P", "$composeNonSkippingGroupOptimizationOption=true") + listOf("-P", composeNonSkippingGroupOptimizationOption) ) if (enableMetricsProvider.orNull == "true") {