Skip to content

Commit bb8cdbc

Browse files
committed
Add stability task end state
1 parent bcc38f7 commit bb8cdbc

File tree

3 files changed

+6
-1
lines changed

3 files changed

+6
-1
lines changed

PerformanceCodelab/app/build.gradle.kts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,9 +69,10 @@ composeCompiler {
6969
// This settings enables strong-skipping mode for all module in this project.
7070
// As an effect, Compose can skip a composable even if it's unstable by comparing it's instance equality (===).
7171
// TODO Codelab task: Enable Strong Skipping Mode
72-
enableStrongSkippingMode = false
72+
enableStrongSkippingMode = true
7373

7474
// TODO Codelab task: Enable Stability Configuration file
75+
stabilityConfigurationFile = project.rootDir.resolve("stability_config.conf")
7576
}
7677

7778
dependencies {

PerformanceCodelab/app/src/main/java/com/compose/performance/stability/StabilityViewModel.kt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
*/
1616
package com.compose.performance.stability
1717

18+
import androidx.compose.runtime.Immutable
1819
import androidx.compose.runtime.getValue
1920
import androidx.compose.runtime.mutableStateOf
2021
import androidx.compose.runtime.neverEqualPolicy
@@ -32,6 +33,7 @@ import kotlinx.coroutines.flow.onEach
3233
import kotlinx.coroutines.flow.stateIn
3334

3435
// TODO Codelab task: make this class Stable
36+
@Immutable
3537
data class StabilityItem(
3638
val id: Int,
3739
val type: StabilityItemType,
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
11
// TODO Codelab task: Make a java.time.LocalDate class stable.
2+
3+
java.time.LocalDate

0 commit comments

Comments
 (0)