-
-
Notifications
You must be signed in to change notification settings - Fork 463
Refactor color definitions #1210
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
mikepenz
commented
Jul 1, 2025
- rework color definitions to provide more flexibility
- FIX LibraryColors.backgroundColor has no effect in M3 library #1206
- update *.api
- refine MIGRATION guides
…out `afterEvaluate` we have to split the plugin into the main part, and the android auto generation code - NOTE: Breaking change
There was a problem hiding this 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 refactors the color definitions to introduce more descriptive properties and enhances plugin structure by splitting Android-specific task registration into its own plugin.
- Renamed
backgroundColor
/contentColor
tolibraryBackgroundColor
/libraryContentColor
and addeddialogBackgroundColor
/dialogContentColor
across Compose modules. - Introduced
AboutLibrariesPluginAndroid
for automatic Android build integration and deprecated the oldregisterAndroidTasks
flag. - Removed legacy deprecated APIs, updated
.api
snapshots, and refined migration and README documentation.
Reviewed Changes
Copilot reviewed 26 out of 26 changed files in this pull request and generated 2 comments.
Show a summary per file
File | Description |
---|---|
plugin-build/plugin/src/main/kotlin/com/mikepenz/aboutlibraries/plugin/AboutLibrariesPluginAndroidExtension.kt | Generalized Android task registration with a customizable block parameter. |
plugin-build/plugin/src/main/kotlin/com/mikepenz/aboutlibraries/plugin/AboutLibrariesPluginAndroid.kt | Added standalone Android Gradle plugin for auto‐registering resource tasks. |
plugin-build/plugin/src/main/kotlin/com/mikepenz/aboutlibraries/plugin/AboutLibrariesPlugin.kt | Updated core plugin to invoke the new Android registration entry point unconditionally. |
plugin-build/plugin/src/main/kotlin/com/mikepenz/aboutlibraries/plugin/AboutLibrariesExtension.kt | Cleaned up and removed now‐unused deprecated Android DSL properties. |
aboutlibraries-compose/src/commonMain/kotlin/com/mikepenz/aboutlibraries/ui/compose/Defaults.kt | Renamed color interface properties and added dialog color variants. |
README.md & MIGRATION.md | Updated docs and migration guide to reflect plugin split and color API changes. |
Comments suppressed due to low confidence (1)
plugin-build/plugin/build.gradle.kts:28
- [nitpick] Consider adding automated tests to verify that the new Android-specific plugin (
aboutlibsAndroidPlugin
) correctly registers tasks and respects Gradle version requirements.
create("aboutlibsAndroidPlugin") {
internal fun configureAndroidTasks( | ||
project: Project, | ||
extension: AboutLibrariesExtension, | ||
block: (Project, AboutLibrariesExtension, @Suppress("DEPRECATION") com.android.build.gradle.api.BaseVariant) -> Unit = ::configureAndroidTasks, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Defaulting the block
parameter to ::configureAndroidTasks
causes the function to call itself recursively, leading to a stack overflow. Consider removing the default or referencing the intended overload (e.g., ::configureAndroidResourceTasks
).
block: (Project, AboutLibrariesExtension, @Suppress("DEPRECATION") com.android.build.gradle.api.BaseVariant) -> Unit = ::configureAndroidTasks, | |
block: (Project, AboutLibrariesExtension, @Suppress("DEPRECATION") com.android.build.gradle.api.BaseVariant) -> Unit = ::configureAndroidTasks as (Project, AboutLibrariesExtension, com.android.build.gradle.api.BaseVariant) -> Unit, |
Copilot uses AI. Check for mistakes.