From 920c50cc3d0eb9304252d217b4af4acb7a8d8234 Mon Sep 17 00:00:00 2001 From: Benoit Marty Date: Thu, 31 Oct 2024 09:19:08 +0100 Subject: [PATCH 1/4] Compile and target API 35. Tested OK on a API 35 emulator. --- .../element/android/features/call/impl/ui/CallScreenView.kt | 1 + .../android/features/share/impl/DefaultShareService.kt | 2 +- .../element/android/libraries/oidc/impl/webview/OidcView.kt | 1 + plugins/src/main/kotlin/Versions.kt | 4 ++-- 4 files changed, 5 insertions(+), 3 deletions(-) diff --git a/features/call/impl/src/main/kotlin/io/element/android/features/call/impl/ui/CallScreenView.kt b/features/call/impl/src/main/kotlin/io/element/android/features/call/impl/ui/CallScreenView.kt index ce9319d0cf..711b203f99 100644 --- a/features/call/impl/src/main/kotlin/io/element/android/features/call/impl/ui/CallScreenView.kt +++ b/features/call/impl/src/main/kotlin/io/element/android/features/call/impl/ui/CallScreenView.kt @@ -183,6 +183,7 @@ private fun WebView.setup( allowFileAccess = true domStorageEnabled = true mediaPlaybackRequiresUserGesture = false + @Suppress("DEPRECATION") databaseEnabled = true loadsImagesAutomatically = true userAgentString = userAgent diff --git a/features/share/impl/src/main/kotlin/io/element/android/features/share/impl/DefaultShareService.kt b/features/share/impl/src/main/kotlin/io/element/android/features/share/impl/DefaultShareService.kt index de53096076..f4ed61dba8 100644 --- a/features/share/impl/src/main/kotlin/io/element/android/features/share/impl/DefaultShareService.kt +++ b/features/share/impl/src/main/kotlin/io/element/android/features/share/impl/DefaultShareService.kt @@ -46,7 +46,7 @@ class DefaultShareService @Inject constructor( PackageManager.GET_ACTIVITIES or PackageManager.MATCH_DISABLED_COMPONENTS ) .activities - .firstOrNull { it.name.endsWith(".ShareActivity") } + ?.firstOrNull { it.name.endsWith(".ShareActivity") } ?.let { shareActivityInfo -> ComponentName( shareActivityInfo.packageName, diff --git a/libraries/oidc/impl/src/main/kotlin/io/element/android/libraries/oidc/impl/webview/OidcView.kt b/libraries/oidc/impl/src/main/kotlin/io/element/android/libraries/oidc/impl/webview/OidcView.kt index 055d516f97..d58eebf8ae 100644 --- a/libraries/oidc/impl/src/main/kotlin/io/element/android/libraries/oidc/impl/webview/OidcView.kt +++ b/libraries/oidc/impl/src/main/kotlin/io/element/android/libraries/oidc/impl/webview/OidcView.kt @@ -86,6 +86,7 @@ fun OidcView( javaScriptEnabled = true allowContentAccess = true allowFileAccess = true + @Suppress("DEPRECATION") databaseEnabled = true domStorageEnabled = true } diff --git a/plugins/src/main/kotlin/Versions.kt b/plugins/src/main/kotlin/Versions.kt index c71a77ac47..61df38ebd7 100644 --- a/plugins/src/main/kotlin/Versions.kt +++ b/plugins/src/main/kotlin/Versions.kt @@ -52,8 +52,8 @@ private const val versionPatch = 3 object Versions { val versionCode = 4_000_000 + versionMajor * 1_00_00 + versionMinor * 1_00 + versionPatch val versionName = "$versionMajor.$versionMinor.$versionPatch" - const val compileSdk = 34 - const val targetSdk = 34 + const val compileSdk = 35 + const val targetSdk = 35 // When updating the `minSdk`, make sure to update the value of `minSdkVersion` in the file `tools/release/release.sh` val minSdk = if (isEnterpriseBuild) 26 else 24 From 4f60ee2eb23b0187b59bc33911a8d7cfd1ad8cca Mon Sep 17 00:00:00 2001 From: Benoit Marty Date: Thu, 31 Oct 2024 09:21:43 +0100 Subject: [PATCH 2/4] Fix warning in Versions.kt: const and naming convention. --- app/build.gradle.kts | 6 +++--- plugins/src/main/kotlin/Versions.kt | 8 ++++---- plugins/src/main/kotlin/extension/CommonExtension.kt | 2 +- samples/minimal/build.gradle.kts | 6 +++--- 4 files changed, 11 insertions(+), 11 deletions(-) diff --git a/app/build.gradle.kts b/app/build.gradle.kts index 74e8abcad8..52fb01f067 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -48,9 +48,9 @@ android { } else { "io.element.android.x" } - targetSdk = Versions.targetSdk - versionCode = Versions.versionCode - versionName = Versions.versionName + targetSdk = Versions.TARGET_SDK + versionCode = Versions.VERSION_CODE + versionName = Versions.VERSION_NAME // Keep abiFilter for the universalApk ndk { diff --git a/plugins/src/main/kotlin/Versions.kt b/plugins/src/main/kotlin/Versions.kt index 61df38ebd7..8a14ce5161 100644 --- a/plugins/src/main/kotlin/Versions.kt +++ b/plugins/src/main/kotlin/Versions.kt @@ -50,10 +50,10 @@ private const val versionMinor = 7 private const val versionPatch = 3 object Versions { - val versionCode = 4_000_000 + versionMajor * 1_00_00 + versionMinor * 1_00 + versionPatch - val versionName = "$versionMajor.$versionMinor.$versionPatch" - const val compileSdk = 35 - const val targetSdk = 35 + const val VERSION_CODE = 4_000_000 + versionMajor * 1_00_00 + versionMinor * 1_00 + versionPatch + const val VERSION_NAME = "$versionMajor.$versionMinor.$versionPatch" + const val COMPILE_SDK = 35 + const val TARGET_SDK = 35 // When updating the `minSdk`, make sure to update the value of `minSdkVersion` in the file `tools/release/release.sh` val minSdk = if (isEnterpriseBuild) 26 else 24 diff --git a/plugins/src/main/kotlin/extension/CommonExtension.kt b/plugins/src/main/kotlin/extension/CommonExtension.kt index 4f3f23d707..7c96386a6b 100644 --- a/plugins/src/main/kotlin/extension/CommonExtension.kt +++ b/plugins/src/main/kotlin/extension/CommonExtension.kt @@ -15,7 +15,7 @@ import java.io.File fun CommonExtension<*, *, *, *, *, *>.androidConfig(project: Project) { defaultConfig { - compileSdk = Versions.compileSdk + compileSdk = Versions.COMPILE_SDK minSdk = Versions.minSdk testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner" diff --git a/samples/minimal/build.gradle.kts b/samples/minimal/build.gradle.kts index e32054a272..48713af442 100644 --- a/samples/minimal/build.gradle.kts +++ b/samples/minimal/build.gradle.kts @@ -14,9 +14,9 @@ android { defaultConfig { applicationId = "io.element.android.samples.minimal" - targetSdk = Versions.targetSdk - versionCode = Versions.versionCode - versionName = Versions.versionName + targetSdk = Versions.TARGET_SDK + versionCode = Versions.VERSION_CODE + versionName = Versions.VERSION_NAME testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner" } From 197cad9f8c8a5fae4557a671e8974b1027d20fdc Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 4 Nov 2024 16:39:33 +0000 Subject: [PATCH 3/4] fix(deps): update dependency androidx.constraintlayout:constraintlayout to v2.2.0 --- gradle/libs.versions.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index f431a76e9b..12c0bf626b 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -17,7 +17,7 @@ core = "1.13.1" # due to the DefaultMigrationStore not behaving as expected. # Stick to 1.0.0 for now, and ensure that this scenario cannot be reproduced when upgrading the version. datastore = "1.0.0" -constraintlayout = "2.1.4" +constraintlayout = "2.2.0" constraintlayout_compose = "1.1.0" lifecycle = "2.8.6" activity = "1.9.3" From 75bd7457f339aed0eded5fd465e4837615052797 Mon Sep 17 00:00:00 2001 From: mxandreas Date: Tue, 5 Nov 2024 11:03:48 +0200 Subject: [PATCH 4/4] Update project status Update the project status to reflect that we're now in a phase of rollout and migrating. --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index f838a0fe50..5ae9b0c2b4 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,7 @@ # Element X Android -Element X Android is a [Matrix](https://matrix.org/) Android Client provided by [element.io](https://element.io/). This app is currently in a pre-alpha release stage with only basic functionalities. +Element X Android is a [Matrix](https://matrix.org/) Android Client provided by [element.io](https://element.io/). The application is a total rewrite of [Element-Android](https://github.com/element-hq/element-android) using the [Matrix Rust SDK](https://github.com/matrix-org/matrix-rust-sdk) underneath and targeting devices running Android 7+. The UI layer is written using [Jetpack Compose](https://developer.android.com/jetpack/compose), and the navigation is managed using [Appyx](https://github.com/bumble-tech/appyx). @@ -71,7 +71,7 @@ We're doing this as a way to share code between platforms and while we've seen p ## Status -This project is in work in progress. The app does not cover yet all functionalities we expect. The list of supported features can be found in [this issue](https://github.com/element-hq/element-x-android/issues/911). +This project is in an early rollout and migration phase. ## Contributing