diff --git a/balloon/build.gradle.kts b/balloon/build.gradle.kts index 330c50ef..562c87d9 100644 --- a/balloon/build.gradle.kts +++ b/balloon/build.gradle.kts @@ -91,5 +91,7 @@ dependencies { implementation(libs.androidx.lifecycle) implementation(libs.androidx.annotation) + compileOnly(libs.compose.stable.marker) + baselineProfile(project(":benchmark")) } diff --git a/balloon/src/main/kotlin/com/skydoves/balloon/Balloon.kt b/balloon/src/main/kotlin/com/skydoves/balloon/Balloon.kt index 938d53e5..f6c3bd38 100644 --- a/balloon/src/main/kotlin/com/skydoves/balloon/Balloon.kt +++ b/balloon/src/main/kotlin/com/skydoves/balloon/Balloon.kt @@ -63,6 +63,7 @@ import androidx.annotation.MainThread import androidx.annotation.Px import androidx.annotation.StringRes import androidx.annotation.StyleRes +import androidx.compose.runtime.Stable import androidx.core.view.ViewCompat import androidx.core.view.forEach import androidx.core.view.get @@ -1900,6 +1901,7 @@ public class Balloon private constructor( } /** Builder class for creating [Balloon]. */ + @Stable @BalloonInlineDsl public class Builder(private val context: Context) { @Px @@ -3159,6 +3161,7 @@ public class Balloon private constructor( * * @see [Lazy Initialization](https://github.com/skydoves/Balloon#lazy-initialization) */ + @Stable public abstract class Factory { /** diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index b22230d9..46317220 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -16,6 +16,7 @@ androidxLifecycle = "2.6.2" androidxAnnotation = "1.7.1" androidxMacroBenchmark = "1.2.2" androidxTest = "1.5.2" +composeStableMarker = "1.0.2" baselineProfiles = "1.3.1" uiAutomator = "2.3.0-beta01" spotless = "6.21.0" @@ -47,6 +48,7 @@ androidx-activity-compose = { group = "androidx.activity", name = "activity-comp androidx-compose-foundation = { group = "androidx.compose.foundation", name = "foundation" } androidx-compose-runtime = { group = "androidx.compose.runtime", name = "runtime" } androidx-compose-constraintlayout = { group = "androidx.constraintlayout", name = "constraintlayout-compose", version.ref = "androidxComposeConstraintLayout" } +compose-stable-marker = { group = "com.github.skydoves", name = "compose-stable-marker", version.ref = "composeStableMarker" } # unit test androidx-test-runner = { group = "androidx.test", name = "runner", version.ref = "androidxTest" }