Convert dependency version checker to Kotlin source#162771
Convert dependency version checker to Kotlin source#162771auto-submit[bot] merged 16 commits intoflutter:masterfrom
Conversation
…e there other side affects?
|
Golden file changes have been found for this pull request. Click here to view and triage (e.g. because this is an intentional change). If you are still iterating on this change and are not ready to resolve the images on the Flutter Gold dashboard, consider marking this PR as a draft pull request above. You will still be able to view image results on the dashboard, commenting will be silenced, and the check will not try to resolve itself until marked ready for review. For more guidance, visit Writing a golden file test for Reviewers: Read the Tree Hygiene page and make sure this patch meets those guidelines before LGTMing. |
|
|
||
| dependencies { | ||
| compileOnly("androidx.annotation:annotation-jvm:1.9.1") | ||
| implementation("org.jetbrains.kotlin:kotlin-gradle-plugin:1.7.10") |
There was a problem hiding this comment.
Does this version number have a relationship with the kotlin version used? if so consider using a kotlin variable.
There was a problem hiding this comment.
I believe this is actually unrelated now, with it being an implementation dependency
| // TODO(gmackall): AGP has a getKotlinAndroidPluginVersion(), and KGP has a | ||
| // getKotlinPluginVersion(). Consider replacing this implementation with one of | ||
| // those. |
There was a problem hiding this comment.
FWIW I think there is also a AndroidPluginVersion https://developer.android.com/reference/tools/gradle-api/8.8/com/android/build/api/AndroidPluginVersion#getCurrent()
Co-authored-by: Reid Baker <[email protected]>
…checker_conversion' into dependency_version_checker_conversion
Converts the
dependency_version_checker.ktsscript to a Kotlin source class. Also adds unit tests that depend heavily on mocking, because from what I can tell you can't create an instance of a Gradleorg.gradle.api.Projectfor testing (so I can't pass a realProjecttoDependencyVersionChecker.checkDependencyVersions()).Perhaps functionality for unit testing will come in the future:
https://docs.gradle.org/current/userguide/test_kit.html
Pre-launch Checklist
///).If you need help, consider asking for advice on the #hackers-new channel on Discord.