Skip to content

Add targetSdk to library modules in the testOptions #516

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

Merged
merged 6 commits into from
Jul 22, 2024

Conversation

hud10837
Copy link
Collaborator

@hud10837 hud10837 commented Jul 16, 2024

Related to issue: https://devtopia.esri.com/runtime/kotlin/issues/4231

Description:

Tests are failing due to a popup window that says the app was built for an older version of Android. This has to do with some changes that were introduced by https://issuetracker.google.com/issues/230625468. They deprecated targetSdk for library modules, but when the test app is spun up, it doesn't have a targetSdk and seems to default to minSdk. As a fix, you can now supply targetSdk to testOptions, so I've done that in every library gradle file, as well as adding it into the lint blocks for good measure as that was suggested in the google issue.

Summary of changes:

  • Add targetSdk to library modules testOptions blocks.
  • Add a new flag to successful OAuth sign in tests: FLAG_ACTIVITY_NEW_TASK, which was causing an error and making two tests fail.

Pre-merge Checklist

@hud10837 hud10837 marked this pull request as ready for review July 17, 2024 12:50
Copy link
Collaborator

@colinanderson colinanderson left a comment

Choose a reason for hiding this comment

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

@hud10837 changes look like they match the Google issue and the doc I found for FLAG_ACTIVITY_NEW_TASK so looks ok to me.

@TADraeseke TADraeseke self-requested a review July 18, 2024 14:32
Copy link
Collaborator

@TADraeseke TADraeseke left a comment

Choose a reason for hiding this comment

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

Nice fix @hud10837! I ran successfulSignIn() test before and after your PR and confirm it doesn't pop up with window about sdk version. Nice one!

@hud10837 hud10837 merged commit a4577eb into v.next Jul 22, 2024
@hud10837 hud10837 deleted the hud10837/add-test-target-sdk branch July 22, 2024 10:34
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.

3 participants