-
Notifications
You must be signed in to change notification settings - Fork 29.7k
Convert dependency version checker to Kotlin source #162771
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Convert dependency version checker to Kotlin source #162771
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fantastic find!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.