Skip to content

Commit c03b711

Browse files
committed
Add Compose Stability Analyzer plugin
1 parent fa9bcab commit c03b711

11 files changed

Lines changed: 328 additions & 5 deletions

File tree

.github/workflows/build.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,9 @@ jobs:
4747
- name: Check lint
4848
run: ./gradlew lintDebug --stacktrace
4949

50+
- name: Check stability
51+
run: ./gradlew stabilityCheck --stacktrace
52+
5053
- name: Build all build type and flavor permutations
5154
run: ./gradlew assemble --stacktrace
5255

CONTRIBUTING.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,11 @@
3030
./gradlew lintDebug
3131
```
3232

33+
- stability
34+
```bash
35+
./gradlew stabilityCheck
36+
```
37+
3338
- roborazzi
3439
```bash
3540
./gradlew verifyRoborazziDebug
@@ -55,6 +60,11 @@
5560
./gradlew metalavaGenerateSignatureRelease
5661
```
5762

63+
- stability
64+
```bash
65+
./gradlew stabilityDump
66+
```
67+
5868
- roborazzi
5969
```bash
6070
./gradlew recordRoborazziDebug

gradle/libs.versions.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ dokka = "1.8.10"
99

1010
compose = "1.9.0"
1111
compose-material3 = "1.4.0"
12+
compose-stability-analyzer = "0.2.11"
1213

1314
material = "1.5.0"
1415

@@ -72,6 +73,7 @@ android-application = { id = "com.android.application", version.ref = "agp" }
7273
android-library = { id = "com.android.library", version.ref = "agp" }
7374
kotlin-android = { id = "org.jetbrains.kotlin.android", version.ref = "kotlin" }
7475
compose-compiler = { id = "org.jetbrains.kotlin.plugin.compose", version.ref = "kotlin" }
76+
compose-stability-analyzer = { id = "com.github.skydoves.compose.stability.analyzer", version.ref = "compose-stability-analyzer" }
7577
roborazzi = { id = "io.github.takahirom.roborazzi", version.ref = "roborazzi" }
7678
jetbrains-dokka = { id = "org.jetbrains.dokka", version.ref = "dokka" }
7779
metalava = { id = "me.tylerbwong.gradle.metalava", version.ref = "metalava" }

pre_check.sh

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,31 +9,37 @@ echo "Starting pre-check validations..."
99
echo ""
1010

1111
# Verify dependency changes
12-
echo "🔍 [1/5] Checking dependency guard..."
12+
echo "🔍 [1/6] Checking dependency guard..."
1313
./gradlew dependencyGuard
1414
echo "✓ Dependency guard check passed"
1515
echo ""
1616

1717
# Verify code formatting
18-
echo "🔍 [2/5] Checking code formatting..."
18+
echo "🔍 [2/6] Checking code formatting..."
1919
./gradlew spotlessCheck --init-script gradle/init.gradle.kts
2020
echo "✓ Code formatting check passed"
2121
echo ""
2222

2323
# Verify API compatibility
24-
echo "🔍 [3/5] Checking API compatibility..."
24+
echo "🔍 [3/6] Checking API compatibility..."
2525
./gradlew metalavaCheckCompatibilityRelease
2626
echo "✓ API compatibility check passed"
2727
echo ""
2828

2929
# Static analysis and lint checks
30-
echo "🔍 [4/5] Running lint checks..."
30+
echo "🔍 [4/6] Running lint checks..."
3131
./gradlew lintDebug
3232
echo "✓ Lint check passed"
3333
echo ""
3434

35+
# Verify compose stability
36+
echo "🔍 [5/6] Checking stability..."
37+
./gradlew stabilityCheck
38+
echo "✓ Stability check passed"
39+
echo ""
40+
3541
# Verify screenshots
36-
echo "🔍 [5/5] Checking screenshots..."
42+
echo "🔍 [6/6] Checking screenshots..."
3743
./gradlew verifyRoborazziDebug
3844
echo "✓ Screenshots check passed"
3945
echo ""

readmore-foundation/build.gradle

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ plugins {
55
alias(libs.plugins.maven.publish)
66
alias(libs.plugins.jetbrains.dokka)
77
alias(libs.plugins.metalava)
8+
alias(libs.plugins.compose.stability.analyzer)
89
}
910

1011
android {
Lines changed: 89 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,89 @@
1+
// This file was automatically generated by Compose Stability Analyzer
2+
// https://github.com/skydoves/compose-stability-analyzer
3+
//
4+
// Do not edit this file directly. To update it, run:
5+
// ./gradlew :readmore-foundation:stabilityDump
6+
7+
@Composable
8+
public fun com.webtoonscorp.android.readmore.foundation.BasicReadMoreText(text: kotlin.String, expanded: kotlin.Boolean, modifier: androidx.compose.ui.Modifier?, onExpandedChange: kotlin.Function1<kotlin.Boolean, kotlin.Unit>?, contentPadding: androidx.compose.foundation.layout.PaddingValues?, style: androidx.compose.ui.text.TextStyle?, onTextLayout: kotlin.Function1<androidx.compose.ui.text.TextLayoutResult, kotlin.Unit>?, softWrap: kotlin.Boolean, readMoreText: kotlin.String?, readMoreMaxLines: kotlin.Int, readMoreOverflow: com.webtoonscorp.android.readmore.foundation.ReadMoreTextOverflow, readMoreStyle: androidx.compose.ui.text.SpanStyle?, readLessText: kotlin.String?, readLessStyle: androidx.compose.ui.text.SpanStyle?, toggleArea: com.webtoonscorp.android.readmore.foundation.ToggleArea, $composer: androidx.compose.runtime.Composer?, $changed: kotlin.Int, $changed1: kotlin.Int, $default: kotlin.Int): kotlin.Unit
9+
skippable: false
10+
restartable: true
11+
params:
12+
- text: STABLE (String is immutable)
13+
- expanded: STABLE (primitive type)
14+
- modifier: STABLE (marked @Stable or @Immutable)
15+
- onExpandedChange: STABLE (function type)
16+
- contentPadding: STABLE (marked @Stable or @Immutable)
17+
- style: STABLE (marked @Stable or @Immutable)
18+
- onTextLayout: STABLE (function type)
19+
- softWrap: STABLE (primitive type)
20+
- readMoreText: STABLE
21+
- readMoreMaxLines: STABLE (primitive type)
22+
- readMoreOverflow: STABLE
23+
- readMoreStyle: STABLE (marked @Stable or @Immutable)
24+
- readLessText: STABLE
25+
- readLessStyle: STABLE (marked @Stable or @Immutable)
26+
- toggleArea: STABLE
27+
- $composer: RUNTIME (requires runtime check)
28+
- $changed: STABLE (primitive type)
29+
- $changed1: STABLE (primitive type)
30+
- $default: STABLE (primitive type)
31+
32+
@Composable
33+
public fun com.webtoonscorp.android.readmore.foundation.BasicReadMoreText(text: androidx.compose.ui.text.AnnotatedString, expanded: kotlin.Boolean, modifier: androidx.compose.ui.Modifier?, onExpandedChange: kotlin.Function1<kotlin.Boolean, kotlin.Unit>?, contentPadding: androidx.compose.foundation.layout.PaddingValues?, style: androidx.compose.ui.text.TextStyle?, onTextLayout: kotlin.Function1<androidx.compose.ui.text.TextLayoutResult, kotlin.Unit>?, softWrap: kotlin.Boolean, readMoreText: kotlin.String?, readMoreMaxLines: kotlin.Int, readMoreOverflow: com.webtoonscorp.android.readmore.foundation.ReadMoreTextOverflow, readMoreStyle: androidx.compose.ui.text.SpanStyle?, readLessText: kotlin.String?, readLessStyle: androidx.compose.ui.text.SpanStyle?, toggleArea: com.webtoonscorp.android.readmore.foundation.ToggleArea, $composer: androidx.compose.runtime.Composer?, $changed: kotlin.Int, $changed1: kotlin.Int, $default: kotlin.Int): kotlin.Unit
34+
skippable: false
35+
restartable: true
36+
params:
37+
- text: STABLE (marked @Stable or @Immutable)
38+
- expanded: STABLE (primitive type)
39+
- modifier: STABLE (marked @Stable or @Immutable)
40+
- onExpandedChange: STABLE (function type)
41+
- contentPadding: STABLE (marked @Stable or @Immutable)
42+
- style: STABLE (marked @Stable or @Immutable)
43+
- onTextLayout: STABLE (function type)
44+
- softWrap: STABLE (primitive type)
45+
- readMoreText: STABLE
46+
- readMoreMaxLines: STABLE (primitive type)
47+
- readMoreOverflow: STABLE
48+
- readMoreStyle: STABLE (marked @Stable or @Immutable)
49+
- readLessText: STABLE
50+
- readLessStyle: STABLE (marked @Stable or @Immutable)
51+
- toggleArea: STABLE
52+
- $composer: RUNTIME (requires runtime check)
53+
- $changed: STABLE (primitive type)
54+
- $changed1: STABLE (primitive type)
55+
- $default: STABLE (primitive type)
56+
57+
@Composable
58+
private fun com.webtoonscorp.android.readmore.foundation.CoreReadMoreText(text: androidx.compose.ui.text.AnnotatedString, expanded: kotlin.Boolean, modifier: androidx.compose.ui.Modifier?, onExpandedChange: kotlin.Function1<kotlin.Boolean, kotlin.Unit>?, contentPadding: androidx.compose.foundation.layout.PaddingValues?, style: androidx.compose.ui.text.TextStyle?, onTextLayout: kotlin.Function1<androidx.compose.ui.text.TextLayoutResult, kotlin.Unit>?, softWrap: kotlin.Boolean, readMoreText: kotlin.String?, readMoreMaxLines: kotlin.Int, readMoreOverflow: com.webtoonscorp.android.readmore.foundation.ReadMoreTextOverflow, readMoreStyle: androidx.compose.ui.text.SpanStyle?, readLessText: kotlin.String?, readLessStyle: androidx.compose.ui.text.SpanStyle?, toggleArea: com.webtoonscorp.android.readmore.foundation.ToggleArea, $composer: androidx.compose.runtime.Composer?, $changed: kotlin.Int, $changed1: kotlin.Int, $default: kotlin.Int): kotlin.Unit
59+
skippable: false
60+
restartable: true
61+
params:
62+
- text: STABLE (marked @Stable or @Immutable)
63+
- expanded: STABLE (primitive type)
64+
- modifier: STABLE (marked @Stable or @Immutable)
65+
- onExpandedChange: STABLE (function type)
66+
- contentPadding: STABLE (marked @Stable or @Immutable)
67+
- style: STABLE (marked @Stable or @Immutable)
68+
- onTextLayout: STABLE (function type)
69+
- softWrap: STABLE (primitive type)
70+
- readMoreText: STABLE
71+
- readMoreMaxLines: STABLE (primitive type)
72+
- readMoreOverflow: STABLE
73+
- readMoreStyle: STABLE (marked @Stable or @Immutable)
74+
- readLessText: STABLE
75+
- readLessStyle: STABLE (marked @Stable or @Immutable)
76+
- toggleArea: STABLE
77+
- $composer: RUNTIME (requires runtime check)
78+
- $changed: STABLE (primitive type)
79+
- $changed1: STABLE (primitive type)
80+
- $default: STABLE (primitive type)
81+
82+
@Composable
83+
public fun com.webtoonscorp.android.readmore.foundation.CoreReadMoreText.<anonymous>($composer: androidx.compose.runtime.Composer?, $changed: kotlin.Int): kotlin.Unit
84+
skippable: false
85+
restartable: true
86+
params:
87+
- $composer: RUNTIME (requires runtime check)
88+
- $changed: STABLE (primitive type)
89+

readmore-material/build.gradle

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ plugins {
55
alias(libs.plugins.maven.publish)
66
alias(libs.plugins.jetbrains.dokka)
77
alias(libs.plugins.metalava)
8+
alias(libs.plugins.compose.stability.analyzer)
89
}
910

1011
android {
Lines changed: 104 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,104 @@
1+
// This file was automatically generated by Compose Stability Analyzer
2+
// https://github.com/skydoves/compose-stability-analyzer
3+
//
4+
// Do not edit this file directly. To update it, run:
5+
// ./gradlew :readmore-material:stabilityDump
6+
7+
@Composable
8+
public fun com.webtoonscorp.android.readmore.material.ReadMoreText(text: kotlin.String, expanded: kotlin.Boolean, modifier: androidx.compose.ui.Modifier?, onExpandedChange: kotlin.Function1<kotlin.Boolean, kotlin.Unit>?, contentPadding: androidx.compose.foundation.layout.PaddingValues?, color: androidx.compose.ui.graphics.Color, fontSize: androidx.compose.ui.unit.TextUnit, fontStyle: androidx.compose.ui.text.font.FontStyle?, fontWeight: androidx.compose.ui.text.font.FontWeight?, fontFamily: androidx.compose.ui.text.font.FontFamily?, letterSpacing: androidx.compose.ui.unit.TextUnit, textDecoration: androidx.compose.ui.text.style.TextDecoration?, textAlign: androidx.compose.ui.text.style.TextAlign, lineHeight: androidx.compose.ui.unit.TextUnit, softWrap: kotlin.Boolean, onTextLayout: kotlin.Function1<androidx.compose.ui.text.TextLayoutResult, kotlin.Unit>?, style: androidx.compose.ui.text.TextStyle?, readMoreText: kotlin.String?, readMoreColor: androidx.compose.ui.graphics.Color, readMoreFontSize: androidx.compose.ui.unit.TextUnit, readMoreFontStyle: androidx.compose.ui.text.font.FontStyle?, readMoreFontWeight: androidx.compose.ui.text.font.FontWeight?, readMoreFontFamily: androidx.compose.ui.text.font.FontFamily?, readMoreTextDecoration: androidx.compose.ui.text.style.TextDecoration?, readMoreMaxLines: kotlin.Int, readMoreOverflow: com.webtoonscorp.android.readmore.foundation.ReadMoreTextOverflow, readMoreStyle: androidx.compose.ui.text.SpanStyle?, readLessText: kotlin.String?, readLessColor: androidx.compose.ui.graphics.Color, readLessFontSize: androidx.compose.ui.unit.TextUnit, readLessFontStyle: androidx.compose.ui.text.font.FontStyle?, readLessFontWeight: androidx.compose.ui.text.font.FontWeight?, readLessFontFamily: androidx.compose.ui.text.font.FontFamily?, readLessTextDecoration: androidx.compose.ui.text.style.TextDecoration?, readLessStyle: androidx.compose.ui.text.SpanStyle?, toggleArea: com.webtoonscorp.android.readmore.foundation.ToggleArea, $composer: androidx.compose.runtime.Composer?, $changed: kotlin.Int, $changed1: kotlin.Int, $changed2: kotlin.Int, $changed3: kotlin.Int, $default: kotlin.Int, $default1: kotlin.Int): kotlin.Unit
9+
skippable: false
10+
restartable: true
11+
params:
12+
- text: STABLE (String is immutable)
13+
- expanded: STABLE (primitive type)
14+
- modifier: STABLE (marked @Stable or @Immutable)
15+
- onExpandedChange: STABLE (function type)
16+
- contentPadding: STABLE (marked @Stable or @Immutable)
17+
- color: STABLE (marked @Stable or @Immutable)
18+
- fontSize: STABLE (marked @Stable or @Immutable)
19+
- fontStyle: STABLE (known stable type)
20+
- fontWeight: STABLE (marked @Stable or @Immutable)
21+
- fontFamily: STABLE (marked @Stable or @Immutable)
22+
- letterSpacing: STABLE (marked @Stable or @Immutable)
23+
- textDecoration: STABLE (marked @Stable or @Immutable)
24+
- textAlign: STABLE (known stable type)
25+
- lineHeight: STABLE (marked @Stable or @Immutable)
26+
- softWrap: STABLE (primitive type)
27+
- onTextLayout: STABLE (function type)
28+
- style: STABLE (marked @Stable or @Immutable)
29+
- readMoreText: STABLE
30+
- readMoreColor: STABLE (marked @Stable or @Immutable)
31+
- readMoreFontSize: STABLE (marked @Stable or @Immutable)
32+
- readMoreFontStyle: STABLE (known stable type)
33+
- readMoreFontWeight: STABLE (marked @Stable or @Immutable)
34+
- readMoreFontFamily: STABLE (marked @Stable or @Immutable)
35+
- readMoreTextDecoration: STABLE (marked @Stable or @Immutable)
36+
- readMoreMaxLines: STABLE (primitive type)
37+
- readMoreOverflow: STABLE
38+
- readMoreStyle: STABLE (marked @Stable or @Immutable)
39+
- readLessText: STABLE
40+
- readLessColor: STABLE (marked @Stable or @Immutable)
41+
- readLessFontSize: STABLE (marked @Stable or @Immutable)
42+
- readLessFontStyle: STABLE (known stable type)
43+
- readLessFontWeight: STABLE (marked @Stable or @Immutable)
44+
- readLessFontFamily: STABLE (marked @Stable or @Immutable)
45+
- readLessTextDecoration: STABLE (marked @Stable or @Immutable)
46+
- readLessStyle: STABLE (marked @Stable or @Immutable)
47+
- toggleArea: STABLE
48+
- $composer: RUNTIME (requires runtime check)
49+
- $changed: STABLE (primitive type)
50+
- $changed1: STABLE (primitive type)
51+
- $changed2: STABLE (primitive type)
52+
- $changed3: STABLE (primitive type)
53+
- $default: STABLE (primitive type)
54+
- $default1: STABLE (primitive type)
55+
56+
@Composable
57+
public fun com.webtoonscorp.android.readmore.material.ReadMoreText(text: androidx.compose.ui.text.AnnotatedString, expanded: kotlin.Boolean, modifier: androidx.compose.ui.Modifier?, onExpandedChange: kotlin.Function1<kotlin.Boolean, kotlin.Unit>?, contentPadding: androidx.compose.foundation.layout.PaddingValues?, color: androidx.compose.ui.graphics.Color, fontSize: androidx.compose.ui.unit.TextUnit, fontStyle: androidx.compose.ui.text.font.FontStyle?, fontWeight: androidx.compose.ui.text.font.FontWeight?, fontFamily: androidx.compose.ui.text.font.FontFamily?, letterSpacing: androidx.compose.ui.unit.TextUnit, textDecoration: androidx.compose.ui.text.style.TextDecoration?, textAlign: androidx.compose.ui.text.style.TextAlign, lineHeight: androidx.compose.ui.unit.TextUnit, softWrap: kotlin.Boolean, onTextLayout: kotlin.Function1<androidx.compose.ui.text.TextLayoutResult, kotlin.Unit>?, style: androidx.compose.ui.text.TextStyle?, readMoreText: kotlin.String?, readMoreColor: androidx.compose.ui.graphics.Color, readMoreFontSize: androidx.compose.ui.unit.TextUnit, readMoreFontStyle: androidx.compose.ui.text.font.FontStyle?, readMoreFontWeight: androidx.compose.ui.text.font.FontWeight?, readMoreFontFamily: androidx.compose.ui.text.font.FontFamily?, readMoreTextDecoration: androidx.compose.ui.text.style.TextDecoration?, readMoreMaxLines: kotlin.Int, readMoreOverflow: com.webtoonscorp.android.readmore.foundation.ReadMoreTextOverflow, readMoreStyle: androidx.compose.ui.text.SpanStyle?, readLessText: kotlin.String?, readLessColor: androidx.compose.ui.graphics.Color, readLessFontSize: androidx.compose.ui.unit.TextUnit, readLessFontStyle: androidx.compose.ui.text.font.FontStyle?, readLessFontWeight: androidx.compose.ui.text.font.FontWeight?, readLessFontFamily: androidx.compose.ui.text.font.FontFamily?, readLessTextDecoration: androidx.compose.ui.text.style.TextDecoration?, readLessStyle: androidx.compose.ui.text.SpanStyle?, toggleArea: com.webtoonscorp.android.readmore.foundation.ToggleArea, $composer: androidx.compose.runtime.Composer?, $changed: kotlin.Int, $changed1: kotlin.Int, $changed2: kotlin.Int, $changed3: kotlin.Int, $default: kotlin.Int, $default1: kotlin.Int): kotlin.Unit
58+
skippable: false
59+
restartable: true
60+
params:
61+
- text: STABLE (marked @Stable or @Immutable)
62+
- expanded: STABLE (primitive type)
63+
- modifier: STABLE (marked @Stable or @Immutable)
64+
- onExpandedChange: STABLE (function type)
65+
- contentPadding: STABLE (marked @Stable or @Immutable)
66+
- color: STABLE (marked @Stable or @Immutable)
67+
- fontSize: STABLE (marked @Stable or @Immutable)
68+
- fontStyle: STABLE (known stable type)
69+
- fontWeight: STABLE (marked @Stable or @Immutable)
70+
- fontFamily: STABLE (marked @Stable or @Immutable)
71+
- letterSpacing: STABLE (marked @Stable or @Immutable)
72+
- textDecoration: STABLE (marked @Stable or @Immutable)
73+
- textAlign: STABLE (known stable type)
74+
- lineHeight: STABLE (marked @Stable or @Immutable)
75+
- softWrap: STABLE (primitive type)
76+
- onTextLayout: STABLE (function type)
77+
- style: STABLE (marked @Stable or @Immutable)
78+
- readMoreText: STABLE
79+
- readMoreColor: STABLE (marked @Stable or @Immutable)
80+
- readMoreFontSize: STABLE (marked @Stable or @Immutable)
81+
- readMoreFontStyle: STABLE (known stable type)
82+
- readMoreFontWeight: STABLE (marked @Stable or @Immutable)
83+
- readMoreFontFamily: STABLE (marked @Stable or @Immutable)
84+
- readMoreTextDecoration: STABLE (marked @Stable or @Immutable)
85+
- readMoreMaxLines: STABLE (primitive type)
86+
- readMoreOverflow: STABLE
87+
- readMoreStyle: STABLE (marked @Stable or @Immutable)
88+
- readLessText: STABLE
89+
- readLessColor: STABLE (marked @Stable or @Immutable)
90+
- readLessFontSize: STABLE (marked @Stable or @Immutable)
91+
- readLessFontStyle: STABLE (known stable type)
92+
- readLessFontWeight: STABLE (marked @Stable or @Immutable)
93+
- readLessFontFamily: STABLE (marked @Stable or @Immutable)
94+
- readLessTextDecoration: STABLE (marked @Stable or @Immutable)
95+
- readLessStyle: STABLE (marked @Stable or @Immutable)
96+
- toggleArea: STABLE
97+
- $composer: RUNTIME (requires runtime check)
98+
- $changed: STABLE (primitive type)
99+
- $changed1: STABLE (primitive type)
100+
- $changed2: STABLE (primitive type)
101+
- $changed3: STABLE (primitive type)
102+
- $default: STABLE (primitive type)
103+
- $default1: STABLE (primitive type)
104+

readmore-material3/build.gradle

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ plugins {
55
alias(libs.plugins.maven.publish)
66
alias(libs.plugins.jetbrains.dokka)
77
alias(libs.plugins.metalava)
8+
alias(libs.plugins.compose.stability.analyzer)
89
}
910

1011
android {

0 commit comments

Comments
 (0)