Split Android task registration into individual plugin#1194
Merged
Split Android task registration into individual plugin#1194
Conversation
Contributor
There was a problem hiding this comment.
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
androidDSL 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
blockis too generic—consider a more descriptive name likevariantHandlerorconfigureVariantfor clarity.
block: (Project, AboutLibrariesExtension, @Suppress("DEPRECATION") com.android.build.gradle.api.BaseVariant) -> Unit = ::configureAndroidTasks,
39190a2 to
eb8531a
Compare
…out `afterEvaluate` we have to split the plugin into the main part, and the android auto generation code - NOTE: Breaking change
eb8531a to
87d9214
Compare
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.
afterEvaluatewe have to split the plugin into the main part, and the android auto generation code