Commit Graph

8 Commits

Author SHA1 Message Date
Benoit Marty
03e23477b7 Fix coroutine scope (#4820)
* Inject the session scope instead of the application scope where it's possible.

* Create AppCoroutineScope annotation to let developers explicitly choose the appropriate CoroutineScope when injecting one.
2025-06-04 15:33:51 +00:00
Jorge Martin Espinosa
58a3ea8b1f Add catchingExceptions method to replace runCatching (#4797)
- Add `runCatchingExceptions` and `mapCatchingExceptions` to replace `runCatching` and `mapCatching`.
- Make `tryOrNull { ... }` catch only exceptions too.
- Apply the changes to the whole project.
- Add new Rust fakes for tests to handle the code that's now unblocked - previously it just threw an `UnsatisfiedLinkError` which we ignored.
- Add a new `detekt-rules` project with a `RunCatchingRule` to prevent `runCatching` and `mapCatching` usages.
2025-06-04 09:02:26 +02:00
Benoit Marty
05fc76822a Apply dual licenses: AGPL + Element Commercial to file headers.
2 replace all actions have been performed:
- "SPDX-License-Identifier: AGPL-3.0-only" to "SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial"
- "Please see LICENSE in the repository root for full details." to "Please see LICENSE files in the repository root for full details."
2025-01-07 10:05:04 +01:00
Jorge Martin Espinosa
e44b5ad98d Upgrade Kotlin to v2.0 (#3594)
* Bump Kotlin to v2.0

* Fix lots of issues due to the upgrade: lint issues, function signature incompatibilities, broken tests, etc.

---------

Co-authored-by: Benoit Marty <benoit@matrix.org>
2024-10-10 08:32:00 +00:00
Jorge Martin Espinosa
2efdb3ae45 Centralise the DI code generation logic (#3562)
* Create Anvil extension helper

* Use the helper everywhere
2024-09-30 12:20:28 +00:00
Benoit Marty
2b016227e9 Migrate license to AGPL.
Run script `uv run license-editor --repository ../element-x-android`
2024-09-06 17:19:19 +02:00
Benoit Marty
45883975c4 Add Konsist test to check that assertThat is imported, and fix existing issues. 2023-12-04 15:18:01 +01:00
Marco Romano
af8f5b805c Delete media caches on startup (#1807)
Clear media caches on app startup
2023-11-20 09:48:11 +00:00