Please complete the following information:
Describe the Bug:
Let's take following example:
// In build.gradle.kts:
composeStabilityAnalyzer {
stabilityValidation {
stabilityConfigurationFiles.add(
rootProject.layout.projectDirectory.file("stability_config.conf")
)
}
}
// stability_config.conf
com.example.MyClassToBeStable
// MyComposable.kt
fun MyComposable(
myObject: MyClassToBeStable
) { ... }
MyComposable is correctly reported by :debugStabilityCheck as stable ✅
However, if you introduce some wrapper e.g. state:
// MyComposable.kt
data class State(
val myObject: MyClassToBeStable
)
fun MyComposable(
state: State
) { ... }
then :debugStabilityCheck incorrectly reports state as unstable, while it's a data class and it contains stable child object.
What is interesting is that IDE with stability config file attached in settings marks this composable correctly as skippable with stable parameter (there's a green box next to it). The issue is only with stabilityDump/Check Gradle tasks.
Expected Behavior:
MyComposable from the example after the changes is reported as skippable, with the state parameter marked as stable.
Please complete the following information:
Describe the Bug:
Let's take following example:
MyComposableis correctly reported by:debugStabilityCheckas stable ✅However, if you introduce some wrapper e.g. state:
then
:debugStabilityCheckincorrectly reportsstateas unstable, while it's a data class and it contains stable child object.What is interesting is that IDE with stability config file attached in settings marks this composable correctly as skippable with stable parameter (there's a green box next to it). The issue is only with
stabilityDump/CheckGradle tasks.Expected Behavior:
MyComposablefrom the example after the changes is reported as skippable, with the state parameter marked as stable.