Skip to content

Commit

Permalink
Use the compiler plugin features flags instead of the deprecated flags (
Browse files Browse the repository at this point in the history
#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
  • Loading branch information
eymar authored Dec 9, 2024
1 parent 2bb8aba commit 455f11b
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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") {
Expand Down

0 comments on commit 455f11b

Please sign in to comment.