Skip to content

Android: Clean up lint warnings and other warnings to get build success #12143

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

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

Sangamesh1997
Copy link
Contributor

@Sangamesh1997 Sangamesh1997 commented Jun 10, 2025

Fixes : #6868 #12142

@Sangamesh1997
Copy link
Contributor Author

@ejona86 @shivaspeaks Can you please review.

@kannanjgithub
Copy link
Contributor

@Sangamesh1997 Can you provide the build error log that you are fixing with this PR? In the failing build.log of PR #12040 I don't see any errors about @TargetApi for example.

@shivaspeaks shivaspeaks added the kokoro:run Add this label to a PR to tell Kokoro the code is safe and tests can be run label Jun 19, 2025
@grpc-kokoro grpc-kokoro removed the kokoro:run Add this label to a PR to tell Kokoro the code is safe and tests can be run label Jun 19, 2025
@Sangamesh1997
Copy link
Contributor Author

@kannanjgithub In the build log of PR #12040 , I observed that the only visible lint error was OldTargetApi. However, when I ran the lint check locally in (lint report.html), it also flagged other warnings like InlineApi, ObseleteSdkInt and NewApi, as mentioned by Eric earlier. So in this PR, I've fixed all these together to ensure build passes cleanly and is future-proof.

@kannanjgithub
Copy link
Contributor

@Sangamesh1997 can you share that lint report.html?

@Sangamesh1997
Copy link
Contributor Author

Sangamesh1997 commented Jun 19, 2025

Copy link
Member

@shivaspeaks shivaspeaks left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are we working on silencing? I thought the discussion happened to upgrade and fix in the #12040 (comment)

@shivaspeaks shivaspeaks requested a review from ejona86 June 19, 2025 16:02
@Sangamesh1997
Copy link
Contributor Author

Are we working on silencing? I thought the discussion happened to upgrade and fix in the #12040 (comment)

@shivaspeaks I have addressed and cleared all the lint warnings in #12143, which resolves the issue tracked in #6868.
Since the team is currently working on upgrading the Android Gradle Plugin (AGP) in #10152, the target SDK upgrade to 35/36 will be taken up after that is complete.
That’s why I focused on cleaning up the lint warnings first — to help unblock and resolve the 6868 issue as a separate step.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Teach Android build -PfailOnWarnings=true
4 participants