Conversation
Owner
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
Contributor
There was a problem hiding this comment.
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/contentColortolibraryBackgroundColor/libraryContentColorand addeddialogBackgroundColor/dialogContentColoracross Compose modules. - Introduced
AboutLibrariesPluginAndroidfor automatic Android build integration and deprecated the oldregisterAndroidTasksflag. - Removed legacy deprecated APIs, updated
.apisnapshots, 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.
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).
Suggested change
| 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, |
plugin-build/plugin/src/main/kotlin/com/mikepenz/aboutlibraries/plugin/AboutLibrariesPlugin.kt
Show resolved
Hide resolved
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.