Merge pull request #1381 from android/ben/strongskip

Enable strong skipping
pull/1388/head
Ben Trengrove 8 months ago committed by GitHub
commit 0ba430ef90
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -57,6 +57,7 @@ internal fun Project.configureAndroidCompose(
kotlinOptions { kotlinOptions {
freeCompilerArgs += buildComposeMetricsParameters() freeCompilerArgs += buildComposeMetricsParameters()
freeCompilerArgs += stabilityConfiguration() freeCompilerArgs += stabilityConfiguration()
freeCompilerArgs += strongSkippingConfiguration()
} }
} }
} }
@ -84,6 +85,7 @@ private fun Project.buildComposeMetricsParameters(): List<String> {
"plugin:androidx.compose.compiler.plugins.kotlin:reportsDestination=" + reportsFolder.absolutePath "plugin:androidx.compose.compiler.plugins.kotlin:reportsDestination=" + reportsFolder.absolutePath
) )
} }
return metricParameters.toList() return metricParameters.toList()
} }
@ -91,3 +93,8 @@ private fun Project.stabilityConfiguration() = listOf(
"-P", "-P",
"plugin:androidx.compose.compiler.plugins.kotlin:stabilityConfigurationPath=${project.rootDir.absolutePath}/compose_compiler_config.conf", "plugin:androidx.compose.compiler.plugins.kotlin:stabilityConfigurationPath=${project.rootDir.absolutePath}/compose_compiler_config.conf",
) )
private fun Project.strongSkippingConfiguration() = listOf(
"-P",
"plugin:androidx.compose.compiler.plugins.kotlin:experimentalStrongSkipping=true",
)

@ -2,5 +2,10 @@
// It allows us to define classes that our not part of our codebase without wrapping them in a stable class. // It allows us to define classes that our not part of our codebase without wrapping them in a stable class.
// For more information, check https://developer.android.com/jetpack/compose/performance/stability/fix#configuration-file // For more information, check https://developer.android.com/jetpack/compose/performance/stability/fix#configuration-file
// We always use immutable classes for our data model, to avoid running the Compose compiler
// in the module we declare it to be stable here.
com.google.samples.apps.nowinandroid.core.model.data.*
// Java standard library classes
java.time.ZoneId java.time.ZoneId
java.time.ZoneOffset java.time.ZoneOffset

Loading…
Cancel
Save