Skip to content

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

Merged
merged 5 commits into from
Jul 4, 2025
Merged

Refactor color definitions #1210

merged 5 commits into from
Jul 4, 2025

Conversation

mikepenz
Copy link
Owner

@mikepenz mikepenz commented Jul 1, 2025

@mikepenz mikepenz requested a review from Copilot July 1, 2025 19:49
Copy link
Contributor

@Copilot 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 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 to libraryBackgroundColor/libraryContentColor and added dialogBackgroundColor/dialogContentColor across Compose modules.
  • Introduced AboutLibrariesPluginAndroid for automatic Android build integration and deprecated the old registerAndroidTasks 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,
Copy link
Preview

Copilot AI Jul 1, 2025

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).

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,

Copilot uses AI. Check for mistakes.

@mikepenz mikepenz merged commit 67c372e into develop Jul 4, 2025
3 checks passed
@mikepenz mikepenz deleted the feature/1206 branch July 4, 2025 10:56
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.

LibraryColors.backgroundColor has no effect in M3 library
1 participant