* Upgrade the used JDK in the project to v21
* Use it for CI too
* Centralise java language version
* Fix deprecations, tests and lint issues
* Fix coverage taking into account `@Preview` annotated code.
---------
Co-authored-by: Benoit Marty <benoit@matrix.org>
* Use Anvil KSP instead of the Square KAPT one
* Fix several configuration cache, lint and test issues
* Allow incremental kotlin compilation in the CI
* Workaround Robolectric + Compose issue that caused `AppNotIdleException`
* Update the `enterprise` commit hash
* Update screenshots
---------
Co-authored-by: ElementBot <android@element.io>
* Try to workaround OOM errors and the runner dying
* Some more tweaks:
- Add `-XX:MaxMetaspaceSize` (https://github.com/gradle/gradle/issues/19750)
- Remove `-PpreDexEnable` as it's deprecated and no longer used.
- Remove `--max-workers` as gradle will automatically use the optimal amount.
* Remove `--max-workers` in recording screenshots too
* Try fixing OOM by changing GC and adding RAM to the kotlin compiler
* Add gradle cache to build apk job in maestro flow.
- Remove unnecessary dependency in `:features:call` module.
* Fix sonar in nightly reports
* Bump heap size of nightly reports
* Bump max heap size for building the debug APK for Maestro
* Enable `sonar.gradle.skipCompile`
* Fix sonar job
* Bump the MaxMetaspaceSize
* Don't try to upload failed test results to codecov, it doesn't work
* Disable Paparazzi tasks when Kover is running.
It allows us to split the test jobs between unit tests, screenshot test and coverage reports.
* Move Sonar upload to the quality workflow, since we have no lint info in tests.
* Try to improve 'Tests' CI job times
* Remove `-Pci-build=true` for jobs where the debug mode can be explicitly used
* Add some more excluded `*State` values for kover
* Run paparazzi verification at the same time as Kover tasks, otherwise the coverage is lost.
Error was:
Some problems were found with the configuration of task ':koverMergedHtmlReport' (type 'KoverHtmlTask').
- Gradle detected a problem with the following location: '/home/runner/work/element-x-android/element-x-android/features/analytics/api/build/tmp/kotlin-classes/release'.
Reason: Task ':koverMergedHtmlReport' uses this output of task ':features:analytics:api:compileReleaseKotlin' without declaring an explicit or implicit dependency. This can lead to incorrect results being produced, depending on what order the tasks are executed.
Possible solutions:
1. Declare task ':features:analytics:api:compileReleaseKotlin' as an input of ':koverMergedHtmlReport'.
2. Declare an explicit dependency on ':features:analytics:api:compileReleaseKotlin' from ':koverMergedHtmlReport' using Task#dependsOn.
3. Declare an explicit dependency on ':features:analytics:api:compileReleaseKotlin' from ':koverMergedHtmlReport' using Task#mustRunAfter.
...
Uses https://github.com/nschloe/action-cached-lfs-checkout where we're using git-lfs.
This is a wrapper around `actions/checkout@v3` which uses `actions/cache@v3` to cache the files on LFS to avoid downloading them every time and spare LFS bandwidth.
Move the dependency check job from the quality workflow that
runs on every PR to the nightly reports workflow. This sometimes
flakes as it does a _lot_ of HTTP requests. It's less intrusive
if that happens outside of the PR workflow.
Also change the nightly job that runs tests to use LFS, so it
actually has access to screenshots :)
The sonar task is still broken, but it seems like an upstream bug:
https://community.sonarsource.com/t/sonar-plugin-4-1-0-3113-4-2-0-3129-errors/91568