-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Update target and compile Android sdk versions to v29 #25488
Merged
mchowning
merged 5 commits into
WordPress:master
from
malinajirka:update/android-target-and-compile-sdk-versions
Sep 23, 2020
Merged
Changes from 1 commit
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
1334c24
Update target and compile Android sdk versions to v29
malinajirka f29f99b
Fix justification mode lint errors/warnings
malinajirka ca2c3dd
Merge branch 'master' into update/android-target-and-compile-sdk-vers…
malinajirka baf1822
Add missing import and a comment
malinajirka 1a8730e
Fix missing import
malinajirka File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Looks like LineBreaker was introduced in Q. Should we do something like this?
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.
Good question ;). I believe we don't need to do that. Constants are replaced during compilation and they haven't changed the values of the constants. They just moved them to a different file. Our compileSdkVersion is set to 29 so using just the constant for api 29 seems legit. Either case, I'll try to run this code on API 27 emulator to make sure I'm not wrong :).
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.
Hmm, I'm looking into this more. It seems that lint on CI complains in WPAndroid - it doesn't complain locally.
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 think lint is quite confused, when I wrap the call it fails with:
I think the original code would work just fine for the reasons stated above. However, I wrapped the code with the "build version" ifs. It's not nice but hopefully both local and CI lint will be happy :P.
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.
Nice job figuring out the magic incantation to make lint happy! 😄
It looks like we're missing an import for the
@Require
annotation, which is causing the build failure. Also, what would you think about adding a comment explaining that we're jumping through these weird hoops because of (what looks like) a bug in lint? Otherwise, I feel like someone is eventually going to "fix" this and end up going down this same rabbithole once they start getting lint errors on their PR.Alternatively, with a comment like that, I'd be fine just suppressing the relevant lint warning if you preferred to do that. I'm fine with either approach.
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 have filed an issue (wordpress-mobile/gutenberg-mobile#2653) for us to fix this "code change in gutenberg causes no problems until we try to run lint in WPAndroid" problem. Wanted to let you know because I figured you might have some thoughts on that given your recent experience. 😉