Skip to content

Add Compost Stability Plugin#1279

Merged
mikepenz merged 6 commits intodevelopfrom
feature/compose_stability
Dec 20, 2025
Merged

Add Compost Stability Plugin#1279
mikepenz merged 6 commits intodevelopfrom
feature/compose_stability

Conversation

@mikepenz
Copy link
Owner

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds the Compose Stability Analyzer plugin to the project and restructures the build configuration of several modules to use a more modern Kotlin Multiplatform (KMP) approach. Note that the PR title contains a spelling error: "Compost" should be "Compose".

Key changes:

  • Adds the stability analyzer plugin to Compose modules (app, aboutlibraries-compose, aboutlibraries-compose-m3, aboutlibraries-compose-m2)
  • Migrates aboutlibraries-core and compose modules to use androidKmpLibrary plugin with Android configuration inside the kotlin {} block
  • Updates version catalog to 0.10.4 and disables Gradle configuration on demand

Reviewed changes

Copilot reviewed 8 out of 9 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
settings.gradle.kts Bumps version catalog from 0.10.3 to 0.10.4
gradle.properties Disables configuration on demand (was enabled)
build.gradle.kts Adds androidKmpLibrary and stabilityAnalyzer plugin declarations
app/build.gradle.kts Applies stabilityAnalyzer plugin to app module
aboutlibraries/build.gradle.kts Changes from kotlin-multiplatform to kotlin convention plugin
aboutlibraries-core/build.gradle.kts Restructures to use androidKmpLibrary with Android config inside kotlin block
aboutlibraries-compose/build.gradle.kts Migrates to androidKmpLibrary pattern and adds stabilityAnalyzer plugin
aboutlibraries-compose-m3/build.gradle.kts Migrates to androidKmpLibrary pattern, adds stabilityAnalyzer, removes screenshot plugin
aboutlibraries-compose-m2/build.gradle.kts Migrates to androidKmpLibrary pattern, adds stabilityAnalyzer, removes screenshot plugin

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

android {
namespace = "com.mikepenz.aboutlibraries.ui.compose.m3"
compileSdk = baseLibs.versions.compileSdk.get().toInt()
minSdk = project.readPropertyOrElse("com.mikepenz.android.minSdk", "${baseLibs.versions.minSdk.get().toInt()}", null).toString().toInt()
Copy link

Copilot AI Dec 20, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The minSdk conversion logic is unnecessarily complex and redundant. The expression first converts to Int, then to String, then back to Int. This should be simplified to just project.readPropertyOrElse("com.mikepenz.android.minSdk", baseLibs.versions.minSdk.get(), null).toInt() or similar, removing the intermediate string conversion.

Suggested change
minSdk = project.readPropertyOrElse("com.mikepenz.android.minSdk", "${baseLibs.versions.minSdk.get().toInt()}", null).toString().toInt()
minSdk = project.readPropertyOrElse("com.mikepenz.android.minSdk", baseLibs.versions.minSdk.get(), null).toInt()

Copilot uses AI. Check for mistakes.
android {
namespace = "com.mikepenz.aboutlibraries.ui.compose"
compileSdk = baseLibs.versions.compileSdk.get().toInt()
minSdk = project.readPropertyOrElse("com.mikepenz.android.minSdk", "${baseLibs.versions.minSdk.get().toInt()}", null).toString().toInt()
Copy link

Copilot AI Dec 20, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The minSdk conversion logic is unnecessarily complex and redundant. The expression first converts to Int, then to String, then back to Int. This should be simplified to just project.readPropertyOrElse("com.mikepenz.android.minSdk", baseLibs.versions.minSdk.get(), null).toInt() or similar, removing the intermediate string conversion.

Suggested change
minSdk = project.readPropertyOrElse("com.mikepenz.android.minSdk", "${baseLibs.versions.minSdk.get().toInt()}", null).toString().toInt()
minSdk = project.readPropertyOrElse("com.mikepenz.android.minSdk", baseLibs.versions.minSdk.get(), null).toInt()

Copilot uses AI. Check for mistakes.
kotlin {
applyDefaultHierarchyTemplate()


Copy link

Copilot AI Dec 20, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is an unnecessary blank line here. This empty line should be removed to maintain consistent code formatting.

Suggested change

Copilot uses AI. Check for mistakes.
android {
namespace = "com.mikepenz.aboutlibraries.core"
compileSdk = baseLibs.versions.compileSdk.get().toInt()
minSdk = project.readPropertyOrElse("com.mikepenz.android.minSdk", "${baseLibs.versions.minSdk.get().toInt()}", null).toString().toInt()
Copy link

Copilot AI Dec 20, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The minSdk conversion logic is unnecessarily complex and redundant. The expression first converts to Int, then to String, then back to Int. This should be simplified to just project.readPropertyOrElse("com.mikepenz.android.minSdk", baseLibs.versions.minSdk.get(), null).toInt() or similar, removing the intermediate string conversion.

Suggested change
minSdk = project.readPropertyOrElse("com.mikepenz.android.minSdk", "${baseLibs.versions.minSdk.get().toInt()}", null).toString().toInt()
minSdk = project.readPropertyOrElse("com.mikepenz.android.minSdk", baseLibs.versions.minSdk.get(), null).toInt()

Copilot uses AI. Check for mistakes.
android {
namespace = "com.mikepenz.aboutlibraries.ui.compose.core"
compileSdk = baseLibs.versions.compileSdk.get().toInt()
minSdk = project.readPropertyOrElse("com.mikepenz.android.minSdk", "${baseLibs.versions.minSdk.get().toInt()}", null).toString().toInt()
Copy link

Copilot AI Dec 20, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The minSdk conversion logic is unnecessarily complex and redundant. The expression first converts to Int, then to String, then back to Int. This should be simplified to just project.readPropertyOrElse("com.mikepenz.android.minSdk", baseLibs.versions.minSdk.get(), null).toInt() or similar, removing the intermediate string conversion.

Suggested change
minSdk = project.readPropertyOrElse("com.mikepenz.android.minSdk", "${baseLibs.versions.minSdk.get().toInt()}", null).toString().toInt()
minSdk = project.readPropertyOrElse("com.mikepenz.android.minSdk", baseLibs.versions.minSdk.get(), null).toInt()

Copilot uses AI. Check for mistakes.
@mikepenz mikepenz force-pushed the feature/compose_stability branch from fd3f58b to 0ba8108 Compare December 20, 2025 11:13
@mikepenz mikepenz merged commit 037dd9b into develop Dec 20, 2025
3 checks passed
@mikepenz mikepenz deleted the feature/compose_stability branch December 20, 2025 12:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants