File tree Expand file tree Collapse file tree 4 files changed +33
-1
lines changed
src/main/kotlin/com/skydoves/compose/stability/gradle Expand file tree Collapse file tree 4 files changed +33
-1
lines changed Original file line number Diff line number Diff line change @@ -27,6 +27,7 @@ public abstract class com/skydoves/compose/stability/gradle/StabilityCheckTask :
2727 public abstract fun getIgnoredClasses ()Lorg/gradle/api/provider/ListProperty;
2828 public abstract fun getIgnoredPackages ()Lorg/gradle/api/provider/ListProperty;
2929 public abstract fun getProjectName ()Lorg/gradle/api/provider/Property;
30+ public abstract fun getQuietCheck ()Lorg/gradle/api/provider/Property;
3031 public abstract fun getStabilityDir ()Lorg/gradle/api/file/DirectoryProperty;
3132 public abstract fun getStabilityInputFile ()Lorg/gradle/api/file/RegularFileProperty;
3233}
@@ -50,5 +51,6 @@ public abstract class com/skydoves/compose/stability/gradle/StabilityValidationC
5051 public final fun getIgnoredProjects ()Lorg/gradle/api/provider/ListProperty;
5152 public final fun getIncludeTests ()Lorg/gradle/api/provider/Property;
5253 public final fun getOutputDir ()Lorg/gradle/api/file/DirectoryProperty;
54+ public final fun getQuietCheck ()Lorg/gradle/api/provider/Property;
5355}
5456
Original file line number Diff line number Diff line change @@ -140,4 +140,24 @@ public abstract class StabilityValidationConfig @Inject constructor(
140140 */
141141 public val failOnStabilityChange: Property <Boolean > =
142142 objects.property(Boolean ::class .javaObjectType).convention(true )
143+
144+ /* *
145+ * Whether to suppress success messages from stability checks.
146+ * When true, "✅ Stability check passed." messages will be hidden for modules that pass.
147+ * Errors and warnings will still be shown.
148+ *
149+ * This is useful in multi-module projects to reduce log noise when many modules pass checks.
150+ * Default: false (success messages shown)
151+ *
152+ * Example:
153+ * ```
154+ * composeStabilityAnalyzer {
155+ * stabilityValidation {
156+ * quietCheck.set(true) // Suppress success messages
157+ * }
158+ * }
159+ * ```
160+ */
161+ public val quietCheck: Property <Boolean > =
162+ objects.property(Boolean ::class .javaObjectType).convention(false )
143163}
Original file line number Diff line number Diff line change @@ -91,6 +91,7 @@ public class StabilityAnalyzerGradlePlugin : KotlinCompilerPluginSupportPlugin {
9191 ignoredPackages.set(extension.stabilityValidation.ignoredPackages)
9292 ignoredClasses.set(extension.stabilityValidation.ignoredClasses)
9393 failOnStabilityChange.set(extension.stabilityValidation.failOnStabilityChange)
94+ quietCheck.set(extension.stabilityValidation.quietCheck)
9495 }
9596
9697 // Make check task depend on stabilityCheck if enabled (only if check task exists)
Original file line number Diff line number Diff line change @@ -68,6 +68,12 @@ public abstract class StabilityCheckTask : DefaultTask() {
6868 @get:Input
6969 public abstract val failOnStabilityChange: Property <Boolean >
7070
71+ /* *
72+ * Whether to suppress success messages when checks pass.
73+ */
74+ @get:Input
75+ public abstract val quietCheck: Property <Boolean >
76+
7177 init {
7278 group = " verification"
7379 description = " Check composable stability against reference file"
@@ -135,7 +141,10 @@ public abstract class StabilityCheckTask : DefaultTask() {
135141 logger.lifecycle(" ✓ Stability check completed with warnings (failOnStabilityChange=false)" )
136142 }
137143 } else {
138- logger.lifecycle(" ✅ Stability check passed." )
144+ // Only show success message if quietCheck is false
145+ if (! quietCheck.get()) {
146+ logger.lifecycle(" ✅ Stability check passed." )
147+ }
139148 }
140149 }
141150
You can’t perform that action at this time.
0 commit comments