Skip to content
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 to gradle version 8.2.2 #1886

Open
wants to merge 19 commits into
base: develop
Choose a base branch
from

Conversation

JulianKast
Copy link
Contributor

@JulianKast JulianKast commented Feb 14, 2024

Fixes #1883

This PR is [ready] for review.

Risk

This PR makes [no] API changes.

Testing Plan

  • I have verified that I have not introduced new warnings in this PR (or explain why below)
  • I have run the unit tests with this PR
  • I have tested this PR against Core and verified behavior (if applicable, if not applicable, explain why below).
  • I have tested Android

Unit Tests

Unit test were updated to work with API level 34 and new gradle version

Core Tests

Tested connecting Hello_SDL app to Sync 3

Core version / branch / commit hash / module tested against: Sync 3
HMI name / version / branch / commit hash / module tested against: Sync 3

Summary

This PR updates gradle version to 8.2.2 to work with API level 34, as well as updates Unit test and ci checks. I also updated som imports for unit testing.

android.yml:
Runs-on - changed from macOS-latest to macos-13. macOS-latest uses version 12 currently, version 13 gets one more core to work with which is helpful to run the new android emulator. They also have a beta of version 14 but only for m1 chips. So to prevent the possibility of macOS-latest of one day pointing at an m1 image, this will give us more longevity and help our checks run smoother on a more demanding android emulator.

arch: - arch defaults to x86, there are no android emulators above api level 30 that are just x86, so specifying x86_64 is now a requirement for them to work.

AudioStreamManagerTest:
We had test failing randomly when broadcast receiver were registered through some test specifying that the exported flag needed to be set, I discovered that some test in AudioStreamManagerTest were overwriting the Build.VERSION.SDK_INT to a lower api level for all test ran after, causing the exported flag to not get set.

Upon fixing this we had other issues with test for the IntegrationValidator, I had to add TestSdlReceiver to pass checks for the BroadcastRecevier.

WiFiSocketFactoryTest:
Some test were failing due to the fact that starting in API level 30 we can no longer use reflection to fake NetworkCapabilities. I added an api level check to bypass them. There is no good way to mock them as the class is final, I tried looking into mockito inline and Roboelectric but could not use them as they are unavailable in androidTestImplementation. There is dexmaker-mockito-inline that could be a possibility, but that would change how mockito is imported into the project and could affect other test.

MultiplexBluetoothTransportTest:
testStateTransitions had to be modified due to the new emulator actually starting the MultiplexBluetoothTransport, so to prevent incompatibility with older emulators I modified it to only check on actual devices

Other unit test issues:
I had to add permissions to the manifest for our unit test as well as the queries section for the router service that is required in newer android versions

CLA

…mission in unit test, update unit test imports
… if device is not an emulator, New emulator actually works, so to prevent incompatibility with older emulators only check on actual devices
…ities, only doing certain checks on API levels less then 30 for WiFiSocketFactoryTest
@JulianKast JulianKast mentioned this pull request Feb 15, 2024
5 tasks
@JulianKast JulianKast changed the title Final Update to gradle version 8.2.2 Update to gradle version 8.2.2 Feb 15, 2024
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.

1 participant