Skip to content

Split Android task registration into individual plugin#1194

Merged
mikepenz merged 2 commits intodevelopfrom
feature/split_android_default_plugin
Jul 4, 2025
Merged

Split Android task registration into individual plugin#1194
mikepenz merged 2 commits intodevelopfrom
feature/split_android_default_plugin

Conversation

@mikepenz
Copy link
Owner

  • to solve the problem of not being able to access the extension without afterEvaluate we have to split the plugin into the main part, and the android auto generation code
  • NOTE: Breaking change

@mikepenz mikepenz requested a review from Copilot June 10, 2025 21:40
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 splits Android task registration into a standalone Android Gradle plugin (AboutLibrariesPluginAndroid), removing the previous in-main-plugin Android logic and the android { registerAndroidTasks } DSL.

  • Extract Android-specific task registration into AboutLibrariesPluginAndroid
  • Deprecate and remove the old android DSL from the main extension
  • Update plugin declarations, consumer build scripts, and migration guide

Reviewed Changes

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

Show a summary per file
File Description
AboutLibrariesPluginAndroidExtension.kt Refactored configureAndroidTasks to accept a callback block
AboutLibrariesPluginAndroid.kt New Android-specific plugin applying resource-generation tasks
AboutLibrariesPlugin.kt Removed the conditional Android registration from the main plugin
AboutLibrariesExtension.kt Deprecated the android DSL properties and methods
build.gradle.kts (plugin-build/plugin) Added new aboutlibsAndroidPlugin entry and updated plugin tags
app/build.gradle.kts & app-test/build.gradle.kts Switched to the new Android plugin ID and removed android {} blocks
MIGRATION.md Added v13.0.0 migration notes for the new Android plugin
Comments suppressed due to low confidence (3)

plugin-build/plugin/src/main/kotlin/com/mikepenz/aboutlibraries/plugin/AboutLibrariesExtension.kt:53

  • The deprecation message refers to aboutlibsAndroidPlugin, but no such extension property or DSL is provided—consider updating the API or the message to reflect the actual replacement.
@Deprecated("Removed, no-op - Use the aboutlibsAndroidPlugin instead.")

MIGRATION.md:5

  • The migration guide calls out the new Android plugin ID but doesn’t mention removal of the old android { registerAndroidTasks } DSL—add a note to guide users on removing that block.
- **Breaking Change**: The `Gradle Plugin` was split into 2. The main one registering all the manual tasks, and an Android specific one automatically registering the Android auto

plugin-build/plugin/src/main/kotlin/com/mikepenz/aboutlibraries/plugin/AboutLibrariesPluginAndroidExtension.kt:11

  • [nitpick] The parameter name block is too generic—consider a more descriptive name like variantHandler or configureVariant for clarity.
block: (Project, AboutLibrariesExtension, @Suppress("DEPRECATION") com.android.build.gradle.api.BaseVariant) -> Unit = ::configureAndroidTasks,

@mikepenz mikepenz force-pushed the feature/split_android_default_plugin branch 2 times, most recently from 39190a2 to eb8531a Compare June 15, 2025 07:03
…out `afterEvaluate` we have to split the plugin into the main part, and the android auto generation code

 - NOTE: Breaking change
@mikepenz mikepenz force-pushed the feature/split_android_default_plugin branch from eb8531a to 87d9214 Compare July 1, 2025 18:23
@mikepenz mikepenz merged commit 719a216 into develop Jul 4, 2025
3 checks passed
@mikepenz mikepenz deleted the feature/split_android_default_plugin branch July 4, 2025 10:54
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