Fix(dynamic_color): apply Kotlin plugin conditionally for AGP 8.x compatibility - #697
Fix(dynamic_color): apply Kotlin plugin conditionally for AGP 8.x compatibility#697HoshsL wants to merge 3 commits into
Conversation
QuncCccccc
left a comment
There was a problem hiding this comment.
LGTM. Thanks a lot for your contribution! I'm new to this package. Is this urgent to merge? if so, feel free to land it after addressing the comments below. Otherwise, we can wait for @guidezpl's for a second review:)
| kotlin { | ||
| val agpMajor = com.android.Version.ANDROID_GRADLE_PLUGIN_VERSION.substringBefore('.').toInt() | ||
|
|
||
| if (agpMajor < 9) { |
There was a problem hiding this comment.
Can we add a short comment explaining why this conditional exists?
Co-authored-by: Qun Cheng <36861262+QuncCccccc@users.noreply.github.com>
guidezpl
left a comment
There was a problem hiding this comment.
Thanks for the PR! Happy to approve this as a patch, could you bump the version to 1.9.1 and update the changelog accordingly?
|
@guidezpl Thanks for the review! I've bumped the version to 1.9.1 and updated the changelog as requested. |
Description
This change adds an AGP version check so that
apply(plugin = "org.jetbrains.kotlin.android")is only executed on AGP 8.x and below, where it is required. AGP 9.x and above handle Kotlin plugin application automatically and no longer need this explicit apply.Tests
No Dart code was modified. Build compatibility has been verified against both AGP 8.x and 9.x.
Issues
Fixes #695
Checklist
CHANGELOG.md