Conversation
- migrate to new variant API, which is available since AGP 7 (https://developer.android.com/reference/tools/gradle-api/8.3/com/android/build/api/variant/AndroidComponentsExtension)
Contributor
There was a problem hiding this comment.
Pull request overview
This pull request introduces breaking changes to modernize the AboutLibraries Gradle plugin by removing all legacy API support and enforcing compatibility with Android Gradle Plugin (AGP) 7.0.0 or newer. The plugin now exclusively uses the new AGP variants API (AndroidComponentsExtension) and eliminates all deprecated tasks and code paths.
Key Changes:
- Enforces AGP 7.0.0+ requirement through runtime check using
Class.forName() - Removes all deprecated
generateLibraryDefinitions*tasks and related code - Eliminates legacy variant API support (
AppExtension,LibraryExtension) and associated task configuration
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
plugin-build/plugin/src/main/kotlin/com/mikepenz/aboutlibraries/plugin/AboutLibrariesPluginAndroid.kt |
Adds AGP 7.0.0+ version check and removes legacy resource task configuration method |
plugin-build/plugin/src/main/kotlin/com/mikepenz/aboutlibraries/plugin/AboutLibrariesPluginAndroidExtension.kt |
Removes support for pre-AGP 7 variant APIs and eliminates deprecated task registration code |
plugin-build/plugin/src/main/kotlin/com/mikepenz/aboutlibraries/plugin/AboutLibrariesTask.kt |
Removes deprecated property and warning logic from task action |
MIGRATION.md |
Documents breaking changes for v14.0.0 regarding deprecated task removal and AGP 7+ requirement |
sample/shared/build.gradle.kts |
Removes unused plugin alias and enables experimental Android resources for KMP |
.github/workflows/ci.yml |
Removes staging variant from release build command |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.
This pull request introduces significant breaking changes to the AboutLibraries Gradle plugin, primarily removing deprecated APIs and enforcing compatibility with Android Gradle Plugin (AGP) 7.0.0 or newer. The changes simplify the plugin's codebase by eliminating legacy support and tasks, and update documentation and build scripts to reflect these requirements.
Plugin API and Compatibility Updates:
AndroidComponentsExtension. Attempting to use the plugin with an older AGP version will log an error and abort plugin application. (AboutLibrariesPluginAndroid.kt,AboutLibrariesPluginAndroidExtension.kt) [1] [2]AppExtension,LibraryExtension, and related code paths) have been removed. The plugin now exclusively uses the new AGP variants API. (AboutLibrariesPluginAndroidExtension.kt)Task Cleanup and Deprecation Removal:
generateLibraryDefinitions*tasks and all related code (including thedeprecatedproperty and warnings) have been removed. Only theexportLibraryDefinitions*tasks remain. (AboutLibrariesPluginAndroidExtension.kt,AboutLibrariesTask.kt) [1] [2] [3]Documentation and Build Script Updates:
MIGRATION.md) is updated to document the removal of deprecated tasks and the new AGP 7+ requirement.androidKmpLibraryplugin alias. (sample/shared/build.gradle.kts) [1] [2]CI Workflow Adjustment:
.github/workflows/ci.yml)