Skip to content

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 36 and new gradle version

Core Tests

Verified Hello_SDL app successfully connects to Sync 3.

Installed and tested Hello_SDL on an API level 36 emulator with 16 KB page sizes, confirming successful connection to Manticore.

Tested video streaming over both Wireless and AOA (Android Open Accessory) connections.

Confirmed multiple SDL apps can connect simultaneously using a single app’s RouterService.

Ran a subset of UI-related tests from the test suite to ensure general functionality remains stable.

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

Summary

This PR updates the project to use Gradle 8.13.0, ensuring compatibility with Android API level 36 and support for 16 KB page sizes. Additionally, it updates unit tests and CI checks to align with the new Gradle configuration. Some import statements used in unit testing have also been cleaned up and modernized.

android.yml:
Runs-on - changed from macOS-latest to ubuntu-latest, which allows for a faster andorid emulator.

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
@JulianKast JulianKast changed the title Update to gradle version 8.2.2 Update to gradle version 8.14 and target API level 36 Nov 4, 2025
@JulianKast JulianKast changed the title Update to gradle version 8.14 and target API level 36 Update to gradle version 8.13 and target API level 36 Nov 5, 2025
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