-
Notifications
You must be signed in to change notification settings - Fork 642
[Infra] Bump kotlin and related deps to 2.0.21 #7105
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
Conversation
Jump to the kotlin 2.x badgawon. Beyond updating the stdlib, related dependencies are bumped to the latest version they released that also depends on 2.0.x Includse: - coroutines - serialization - mockk
📝 PRs merging into main branchOur main branch should always be in a releasable state. If you are working on a larger change, or if you don't want this change to see the light of the day just yet, consider using a feature branch first, and only merge into the main branch when the code complete and ready to be released. |
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.
Summary of Changes
Hello @rlazo, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!
This pull request focuses on a significant infrastructure upgrade, primarily bumping the core Kotlin language version to 2.0.21. This update necessitates corresponding version bumps for several key Kotlin-related libraries to ensure compatibility and leverage the latest features. Additionally, the PR refactors the application of the Kapt Gradle plugin to use version catalogs and temporarily disables the firebase-crashlytics-ndk
subproject.
Highlights
- Kotlin Version Upgrade: The core Kotlin language version has been upgraded from 1.8.22 to 2.0.21, marking a significant jump to the Kotlin 2.x series.
- Dependency Bumps: Key Kotlin ecosystem dependencies such as
coroutines
(1.7.3 -> 1.9.0),serialization
(1.5.1 -> 1.7.3), andmockk
(1.13.11 -> 1.14.2) have been updated to versions compatible with Kotlin 2.0.x. Other related dependencies likedagger
andktorVersion
were also updated. - Gradle Plugin Management Refinement: The
kotlin-kapt
plugin application has been refactored to use a version catalog alias (libs.plugins.kapt
), improving consistency and maintainability of Gradle configurations. - Subproject Exclusion: The
firebase-crashlytics-ndk
subproject has been commented out insubprojects.cfg
, effectively disabling its inclusion in the build process.
Using Gemini Code Assist
The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.
Invoking Gemini
You can request assistance from Gemini at any point in your pull request via creating an issue comment (i.e. comment on the pull request page) using either /gemini <command>
or @gemini-code-assist <command>
. Below is a summary of the supported commands.
Feature | Command | Description |
---|---|---|
Code Review | /gemini review |
Performs a code review for the current pull request in its current state. |
Pull Request Summary | /gemini summary |
Provides a summary of the current pull request in its current state. |
Comment | @gemini-code-assist | Responds in comments when explicitly tagged, both in issue comments and review comments. |
Help | /gemini help |
Displays a list of available commands. |
Customization
To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/
folder in the base of the repository. Detailed instructions can be found here.
Limitations & Feedback
Gemini Code Assist is currently in preview and may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments to provide feedback.
You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.
Footnotes
-
Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution. ↩
Generated by 🚫 Danger |
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.
Code Review
This pull request updates Kotlin and related dependencies. A critical issue was identified with the kapt
plugin version, which is inconsistent with the Kotlin version. Additionally, a medium-severity issue was found regarding the undocumented disabling of the firebase-crashlytics-ndk
module.
Size Report 1Affected Products
Test Logs |
plugins test results68 tests 68 ✅ 1m 30s ⏱️ Results for commit ad4e093. ♻️ This comment has been updated with latest results. |
Coverage Report 1Affected Products
Test Logs |
Error was Error: The type of the for loop iterated value is java.util.concurrent.ConcurrentHashMap.KeySetView<java.lang.String,com.google.firebase.remoteconfig.FirebaseRemoteConfigValue>, which requires API level 24, or core library desugaring (current min is 21); to work around this, add an explicit cast to (Map) before the keySet call. [NewApi] for (String existingKey : allRcConfigMap.keySet()) { ~~~~~~~~~~~~~~~~~~~~~~~ Explanation for issues of type "NewApi": This check scans through all the Android API calls in the application and warns about any calls that are not available on all versions targeted by this application (according to its minimum SDK attribute in the manifest). If you really want to use this API and don't need to support older devices just set the minSdkVersion in your build.gradle or AndroidManifest.xml files. If your code is deliberately accessing newer APIs, and you have ensured (e.g. with conditional execution) that this code will only ever be called on a supported platform, then you can annotate your class or method with the @TargetApi annotation specifying the local minimum SDK to apply, such as @TargetApi(11), such that this check considers 11 rather than your manifest file's minimum SDK as the required API level. If you are deliberately setting android: attributes in style definitions, make sure you place this in a values-vNN folder in order to avoid running into runtime conflicts on certain devices where manufacturers have added custom attributes whose ids conflict with the new ones on later platforms. Similarly, you can use tools:targetApi="11" in an XML file to indicate that the element will only be inflated in an adequate context.
LGTM for Data Connect and Firestore. I'll leave the formal approval to one of the Android Core team members though. Note that this PR should also unblock #7028 (app.cash.turbine:turbine from 1.2.0 to 1.2.1) which I'll re-attempt after this PR is merged. |
Dagger versions above 2.51 cause a very weird error in which a constant in the FeedbackSender code in appdistribution will end up mangled and cause the tests to fail "ONLY IN RELEASE TESTS". The FILE_EXTENSION_JPG = .jpg gets tur into change FILE_EXTENSION_JPG = com.google.firebase.appdistribution.impl.jpg causing the extension check to fail
There's no need to go higher
Robolectric versions higher than 4.12 set window flag different from 1, and the test doesn't aim at testing those, so we are ignoring them.
Superseded by #7117 |
Jump to the kotlin 2.x badgawon. Beyond updating the stdlib, related
dependencies are bumped to the latest version they released that also
depends on 2.0.x
Includse: