31 Commits

Author SHA1 Message Date
Benoit Marty
b3ec256dfa API modules do not need to setup dependency injection.
Move the implementation to the impl modules.
2025-11-12 19:05:39 +01:00
Benoit Marty
1292da2a72 Copyright: Add Element Creations Ltd. copyright 2025-11-10 11:05:05 +01:00
Benoit Marty
b748fcc631 Copyright: Add final period 2025-11-10 10:13:41 +01:00
Benoit Marty
0a0224b586 Copyright: run command uv run license-editor --repository ../element-x-android 2025-11-10 10:09:26 +01:00
Benoit Marty
f1ad56bef1 Move dependencies block out of the android block. 2025-11-03 22:29:38 +01:00
Benoit Marty
826cacf209 Remove @Inject, not necessary anymore when class is annotated with @ContributesBinding 2025-10-22 18:52:37 +02:00
Benoit Marty
c242ad98a7 Remove unused dependency on javax.inject:javax.inject 2025-10-02 10:25:54 +02:00
Benoit Marty
629fc552e5 Use DependencyHandlerScope.testCommonDependencies() 2025-09-16 14:38:31 +02:00
Benoit Marty
ebbcdc7478 Detect mime type when picking a file
The file picker will now try to detect the mime type of the selected file.
If it cannot be detected, it will fallback to `application/octet-stream`.
2025-09-08 11:23:26 +02:00
Jorge Martín
e06bacbff3 Redo DI gradle setup code 2025-09-04 16:49:20 +02:00
Jorge Martín
fc3153bd26 Fix lint issues and restore commented out code 2025-09-04 16:49:18 +02:00
Jorge Martín
92a4b8b66b Start migrating Anvil KSP to Metro 2025-09-04 16:48:34 +02:00
Benoit Marty
ef230e3bda Remove dependency to Anvil from modules that do not use it. 2025-08-25 11:36:42 +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
Benoit Marty
c57af9d010 DefaultPickerProvider: inject the application context and cleanup dead code.
It seems that `isInTest = true` is not used anymore.
2024-11-20 14:43:29 +01:00
Benoit Marty
7324c4fedf Use human readable name for filename of taken photos and videos. Fixes #3894. 2024-11-20 14:32:22 +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
4a43fcb69a Use Anvil KSP instead of the Square KAPT one (#3564)
* 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>
2024-10-02 11:52:17 +00:00
Benoit Marty
31ccdeab51 Protection against ActivityNotFoundException.
Should fix https://sentry.tools.element.io/organizations/element/issues/974670/events/f074c0a4da444a5bacc4ef8f8fd5dbea/
2024-09-24 16:28:43 +02: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
9367f58216 Rename some class from Impl to Default 2024-05-31 09:47:27 +02:00
Benoit Marty
378692f743 Fix moar ktlint issues 2024-01-11 10:02:10 +01:00
renovate[bot]
7e9cda3aa9 Update plugin ktlint to v12.1.0 (#2200)
* Update plugin ktlint to v12.1.0

* Run `./gradlew ktlintFormat` and fix some issues manually.

* Fix other issues reproted by Ktlint

* Limit false positives, KtLint removes unnecessary curly brace in String templates.

* Remove useless Unit

* Minor improvements over ktlint changes

* Restore `AlertDialogContent` behaviour

* Update screenshots

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Benoit Marty <benoit@matrix.org>
Co-authored-by: Jorge Martín <jorgem@element.io>
Co-authored-by: ElementBot <benoitm+elementbot@element.io>
2024-01-10 16:22:24 +01:00
Benoit Marty
b0872d9b58 Remove useless constructor keyword. 2023-12-12 15:29:44 +01:00
Benoit Marty
8b85aa51e2 Konsist: check that if sealed interface is used in parameter of Composable, it has the @Stable or @Immutable annotation 2023-11-03 15:19:55 +01:00
Benoit Marty
7afae87b3e Konsist: add rule obout test class name, and fix existing issue 2023-10-12 15:03:50 +02:00
Benoit Marty
52853101d9 migrate object to data object (#1135) 2023-08-24 09:32:44 +02:00
Florian Renaud
c81e673111 Fix tests after rebase 2023-05-11 16:30:37 +02:00
Florian Renaud
6641afdd17 WIP pick avatar image 2023-05-11 16:30:37 +02:00
Jorge Martin Espinosa
cd298b9359 [Media upload] Media pre-processing (#403)
* Create `mediaupload` module for media pre-processing.

* Split `mediapicker` and `mediaupload` modules.
2023-05-10 10:06:56 +02:00
Jorge Martin Espinosa
8e451c934e Add PickerLauncher wrapper for media/file pickers. (#361)
* Add `PickerLauncher` wrapper for media/file pickers.

* Add FileProvider path, handle Camera picker and add NoOp implementation to fix tests.

* Move media pickers to their own module.

* Add missing media pickers

* Add feature flag and some extra tests
2023-04-28 10:52:34 +02:00