diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 9f039ce5b9..d28af77003 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -9,7 +9,7 @@ on: # Enrich gradle.properties for CI/CD env: - GRADLE_OPTS: -Dorg.gradle.jvmargs="-Xmx7g -XX:MaxMetaspaceSize=512m -Dfile.encoding=UTF-8 -XX:+HeapDumpOnOutOfMemoryError" -Dkotlin.incremental=false -XX:+UseG1GC + GRADLE_OPTS: -Dorg.gradle.jvmargs=-Xmx9g -XX:MaxMetaspaceSize=512m -Dfile.encoding=UTF-8 -XX:+HeapDumpOnOutOfMemoryError -XX:+UseG1GC -Dkotlin.daemon.jvm.options=-Xmx4g -Dkotlin.incremental=false CI_GRADLE_ARG_PROPERTIES: --stacktrace -Dsonar.gradle.skipCompile=true jobs: @@ -39,20 +39,13 @@ jobs: uses: gradle/actions/setup-gradle@v4 with: cache-read-only: ${{ github.ref != 'refs/heads/develop' }} - - name: Assemble debug Gplay APK + - name: Assemble debug APKs if: ${{ matrix.variant == 'debug' }} env: ELEMENT_ANDROID_MAPTILER_API_KEY: ${{ secrets.MAPTILER_KEY }} ELEMENT_ANDROID_MAPTILER_LIGHT_MAP_ID: ${{ secrets.MAPTILER_LIGHT_MAP_ID }} ELEMENT_ANDROID_MAPTILER_DARK_MAP_ID: ${{ secrets.MAPTILER_DARK_MAP_ID }} - run: ./gradlew :app:assembleGplayDebug -PallWarningsAsErrors=true $CI_GRADLE_ARG_PROPERTIES - - name: Assemble debug Fdroid APK - if: ${{ matrix.variant == 'debug' }} - env: - ELEMENT_ANDROID_MAPTILER_API_KEY: ${{ secrets.MAPTILER_KEY }} - ELEMENT_ANDROID_MAPTILER_LIGHT_MAP_ID: ${{ secrets.MAPTILER_LIGHT_MAP_ID }} - ELEMENT_ANDROID_MAPTILER_DARK_MAP_ID: ${{ secrets.MAPTILER_DARK_MAP_ID }} - run: ./gradlew app:assembleFDroidDebug -PallWarningsAsErrors=true $CI_GRADLE_ARG_PROPERTIES + run: ./gradlew :app:assembleGplayDebug app:assembleFDroidDebug -PallWarningsAsErrors=true $CI_GRADLE_ARG_PROPERTIES - name: Upload debug APKs if: ${{ matrix.variant == 'debug' }} uses: actions/upload-artifact@v4 diff --git a/.github/workflows/build_enterprise.yml b/.github/workflows/build_enterprise.yml index 737b61ee06..43073a06c5 100644 --- a/.github/workflows/build_enterprise.yml +++ b/.github/workflows/build_enterprise.yml @@ -9,7 +9,7 @@ on: # Enrich gradle.properties for CI/CD env: - GRADLE_OPTS: -Dorg.gradle.jvmargs="-Xmx7g -XX:MaxMetaspaceSize=512m -Dfile.encoding=UTF-8 -XX:+HeapDumpOnOutOfMemoryError" -Dkotlin.incremental=false -XX:+UseG1GC + GRADLE_OPTS: -Dorg.gradle.jvmargs=-Xmx9g -XX:MaxMetaspaceSize=512m -Dfile.encoding=UTF-8 -XX:+HeapDumpOnOutOfMemoryError -XX:+UseG1GC -Dkotlin.daemon.jvm.options=-Xmx4g -Dkotlin.incremental=false CI_GRADLE_ARG_PROPERTIES: --stacktrace -Dsonar.gradle.skipCompile=true jobs: @@ -61,7 +61,7 @@ jobs: name: elementx-enterprise-debug path: | app/build/outputs/apk/gplay/debug/*-universal-debug.apk - - name: Compile release sources + - name: Compile nightly and release sources if: ${{ matrix.variant == 'release' }} run: ./gradlew compileReleaseSources -PallWarningsAsErrors=true $CI_GRADLE_ARG_PROPERTIES - name: Compile nightly sources diff --git a/.github/workflows/maestro.yml b/.github/workflows/maestro.yml index fd2cc75fd0..6908deaa94 100644 --- a/.github/workflows/maestro.yml +++ b/.github/workflows/maestro.yml @@ -8,7 +8,7 @@ on: # Enrich gradle.properties for CI/CD env: - GRADLE_OPTS: -Dorg.gradle.jvmargs="-Xmx7g -XX:MaxMetaspaceSize=512m -Dfile.encoding=UTF-8 -XX:+HeapDumpOnOutOfMemoryError" -Dkotlin.incremental=false -XX:+UseG1GC + GRADLE_OPTS: -Dorg.gradle.jvmargs=-Xmx9g -XX:MaxMetaspaceSize=512m -Dfile.encoding=UTF-8 -XX:+HeapDumpOnOutOfMemoryError -XX:+UseG1GC -Dkotlin.daemon.jvm.options=-Xmx4g -Dkotlin.incremental=false CI_GRADLE_ARG_PROPERTIES: --stacktrace --no-daemon -Dsonar.gradle.skipCompile=true jobs: @@ -79,7 +79,7 @@ jobs: uses: actions/download-artifact@v4 with: name: elementx-apk-maestro - - uses: mobile-dev-inc/action-maestro-cloud@v1.8.1 + - uses: mobile-dev-inc/action-maestro-cloud@v1.9.1 if: (github.event_name == 'pull_request' && github.event.pull_request.fork == null) || github.event_name == 'workflow_dispatch' with: api-key: ${{ secrets.MAESTRO_CLOUD_API_KEY }} diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml index 921e0f3249..c2e9aa7877 100644 --- a/.github/workflows/nightly.yml +++ b/.github/workflows/nightly.yml @@ -7,7 +7,7 @@ on: - cron: "0 4 * * *" env: - GRADLE_OPTS: -Dorg.gradle.jvmargs="-Xmx6g -XX:MaxMetaspaceSize=512m -Dfile.encoding=UTF-8 -XX:+HeapDumpOnOutOfMemoryError" -Dkotlin.incremental=false -XX:+UseG1GC + GRADLE_OPTS: -Dorg.gradle.jvmargs=-Xmx9g -XX:MaxMetaspaceSize=512m -Dfile.encoding=UTF-8 -XX:+HeapDumpOnOutOfMemoryError -XX:+UseG1GC -Dkotlin.daemon.jvm.options=-Xmx4g -Dkotlin.incremental=false CI_GRADLE_ARG_PROPERTIES: --stacktrace --no-daemon -Dsonar.gradle.skipCompile=true jobs: diff --git a/.github/workflows/nightlyReports.yml b/.github/workflows/nightlyReports.yml index a0d39068eb..6aa6c151a7 100644 --- a/.github/workflows/nightlyReports.yml +++ b/.github/workflows/nightlyReports.yml @@ -8,7 +8,7 @@ on: # Enrich gradle.properties for CI/CD env: - GRADLE_OPTS: -Dorg.gradle.jvmargs="-Xmx7g -XX:MaxMetaspaceSize=512m -Dfile.encoding=UTF-8 -XX:+HeapDumpOnOutOfMemoryError" -Dkotlin.incremental=false -XX:+UseG1GC + GRADLE_OPTS: -Dorg.gradle.jvmargs=-Xmx9g -XX:MaxMetaspaceSize=512m -Dfile.encoding=UTF-8 -XX:+HeapDumpOnOutOfMemoryError -XX:+UseG1GC -Dkotlin.daemon.jvm.options=-Xmx4g -Dkotlin.incremental=false CI_GRADLE_ARG_PROPERTIES: --stacktrace -Dsonar.gradle.skipCompile=true jobs: diff --git a/.github/workflows/nightly_enterprise.yml b/.github/workflows/nightly_enterprise.yml index d1d77b45f5..31077c7998 100644 --- a/.github/workflows/nightly_enterprise.yml +++ b/.github/workflows/nightly_enterprise.yml @@ -7,7 +7,7 @@ on: - cron: "0 4 * * *" env: - GRADLE_OPTS: -Dorg.gradle.jvmargs="-Xmx6g -XX:MaxMetaspaceSize=512m -Dfile.encoding=UTF-8 -XX:+HeapDumpOnOutOfMemoryError" -Dkotlin.incremental=false -XX:+UseG1GC + GRADLE_OPTS: -Dorg.gradle.jvmargs=-Xmx9g -XX:MaxMetaspaceSize=512m -Dfile.encoding=UTF-8 -XX:+HeapDumpOnOutOfMemoryError -XX:+UseG1GC -Dkotlin.daemon.jvm.options=-Xmx4g -Dkotlin.incremental=false CI_GRADLE_ARG_PROPERTIES: --stacktrace --no-daemon -Dsonar.gradle.skipCompile=true jobs: diff --git a/.github/workflows/quality.yml b/.github/workflows/quality.yml index 5157a4b3d6..5d0eaaabc8 100644 --- a/.github/workflows/quality.yml +++ b/.github/workflows/quality.yml @@ -9,7 +9,7 @@ on: # Enrich gradle.properties for CI/CD env: - GRADLE_OPTS: -Dorg.gradle.jvmargs="-Xmx6g -XX:MaxMetaspaceSize=512m -Dfile.encoding=UTF-8 -XX:+HeapDumpOnOutOfMemoryError" -Dkotlin.incremental=false -XX:+UseG1GC + GRADLE_OPTS: -Dorg.gradle.jvmargs=-Xmx9g -XX:MaxMetaspaceSize=512m -Dfile.encoding=UTF-8 -XX:+HeapDumpOnOutOfMemoryError -XX:+UseG1GC -Dkotlin.daemon.jvm.options=-Xmx4g -Dkotlin.incremental=false CI_GRADLE_ARG_PROPERTIES: --stacktrace --no-daemon -Dsonar.gradle.skipCompile=true jobs: diff --git a/.github/workflows/recordScreenshots.yml b/.github/workflows/recordScreenshots.yml index e176c5d7bc..424622f8ca 100644 --- a/.github/workflows/recordScreenshots.yml +++ b/.github/workflows/recordScreenshots.yml @@ -7,7 +7,7 @@ on: # Enrich gradle.properties for CI/CD env: - GRADLE_OPTS: -Dorg.gradle.jvmargs="-Xmx5g -XX:MaxMetaspaceSize=512m -Dfile.encoding=UTF-8 -XX:+HeapDumpOnOutOfMemoryError" -Dkotlin.incremental=false -XX:+UseG1GC -Dsonar.gradle.skipCompile=true + GRADLE_OPTS: -Dorg.gradle.jvmargs=-Xmx9g -XX:MaxMetaspaceSize=512m -Dfile.encoding=UTF-8 -XX:+HeapDumpOnOutOfMemoryError -XX:+UseG1GC -Dkotlin.daemon.jvm.options=-Xmx4g -Dkotlin.incremental=false -Dsonar.gradle.skipCompile=true jobs: record: diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index fea2b6715c..94aeb3dfd1 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -7,7 +7,7 @@ on: # Enrich gradle.properties for CI/CD env: - GRADLE_OPTS: -Dorg.gradle.jvmargs="-Xmx6g -XX:MaxMetaspaceSize=512m -Dfile.encoding=UTF-8 -XX:+HeapDumpOnOutOfMemoryError" -Dkotlin.incremental=false -XX:+UseG1GC + GRADLE_OPTS: -Dorg.gradle.jvmargs=-Xmx9g -XX:MaxMetaspaceSize=512m -Dfile.encoding=UTF-8 -XX:+HeapDumpOnOutOfMemoryError -XX:+UseG1GC -Dkotlin.daemon.jvm.options=-Xmx4g -Dkotlin.incremental=false CI_GRADLE_ARG_PROPERTIES: --stacktrace --no-daemon -Dsonar.gradle.skipCompile=true jobs: @@ -44,7 +44,7 @@ jobs: runs-on: ubuntu-latest if: ${{ github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == 'element-hq/element-x-android' }} concurrency: - group: ${{ format('build-release-main-gplay-{0}', github.sha) }} + group: ${{ format('build-release-main-enterprise-{0}', github.sha) }} cancel-in-progress: true steps: - uses: actions/checkout@v4 diff --git a/.github/workflows/sonar.yml b/.github/workflows/sonar.yml index b5e0be7e2d..7519240ffb 100644 --- a/.github/workflows/sonar.yml +++ b/.github/workflows/sonar.yml @@ -9,7 +9,7 @@ on: # Enrich gradle.properties for CI/CD env: - GRADLE_OPTS: -Dorg.gradle.jvmargs="-Xmx6g -XX:MaxMetaspaceSize=512m -Dfile.encoding=UTF-8 -XX:+HeapDumpOnOutOfMemoryError" -Dkotlin.incremental=false -XX:+UseG1GC + GRADLE_OPTS: -Dorg.gradle.jvmargs=-Xmx9g -XX:MaxMetaspaceSize=512m -Dfile.encoding=UTF-8 -XX:+HeapDumpOnOutOfMemoryError -XX:+UseG1GC -Dkotlin.daemon.jvm.options=-Xmx4g -Dkotlin.incremental=false CI_GRADLE_ARG_PROPERTIES: --stacktrace --warn -Dsonar.gradle.skipCompile=true GROUP: ${{ format('sonar-{0}', github.ref) }} @@ -36,16 +36,8 @@ jobs: uses: gradle/actions/setup-gradle@v4 with: cache-read-only: ${{ github.ref != 'refs/heads/develop' }} - - name: Build Gplay Debug - run: ./gradlew :app:assembleGplayDebug $CI_GRADLE_ARG_PROPERTIES - - name: Build Fdroid Debug - run: ./gradlew :app:assembleFdroidDebug $CI_GRADLE_ARG_PROPERTIES - - name: Build Sample - run: ./gradlew :samples:minimal:assembleDebug $CI_GRADLE_ARG_PROPERTIES - - name: Build library fixtures - run: ./gradlew assembleDebug createFullJarDebugTestFixtures $CI_GRADLE_ARG_PROPERTIES - - name: Build app fixtures - run: ./gradlew :app:createFullJarGplayDebugTestFixtures $CI_GRADLE_ARG_PROPERTIES + - name: Build debug code and test fixtures + run: ./gradlew assembleDebug createFullJarDebugTestFixtures :app:createFullJarGplayDebugTestFixtures $CI_GRADLE_ARG_PROPERTIES - name: 🔊 Publish results to Sonar env: SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index e96dcae925..0cde28968f 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -9,7 +9,7 @@ on: # Enrich gradle.properties for CI/CD env: - GRADLE_OPTS: -Dorg.gradle.jvmargs="-Xmx7g -XX:MaxMetaspaceSize=512m -Dfile.encoding=UTF-8 -XX:+HeapDumpOnOutOfMemoryError" -Dkotlin.incremental=false -XX:+UseG1GC + GRADLE_OPTS: -Dorg.gradle.jvmargs="-Xmx7g -XX:MaxMetaspaceSize=512m -Dfile.encoding=UTF-8 -XX:+HeapDumpOnOutOfMemoryError" -Dkotlin.incremental=false -Dkotlin.daemon.jvm.options=-Xmx2g -XX:+UseG1GC CI_GRADLE_ARG_PROPERTIES: --stacktrace -Dsonar.gradle.skipCompile=true jobs: diff --git a/.maestro/tests/assertions/assertSessionVerificationDisplayed.yaml b/.maestro/tests/assertions/assertSessionVerificationDisplayed.yaml index 6690dfddb4..f983ced873 100644 --- a/.maestro/tests/assertions/assertSessionVerificationDisplayed.yaml +++ b/.maestro/tests/assertions/assertSessionVerificationDisplayed.yaml @@ -1,5 +1,5 @@ appId: ${MAESTRO_APP_ID} --- - extendedWaitUntil: - visible: "Confirm that it's you" + visible: "Confirm your identity" timeout: 20000 diff --git a/CHANGES.md b/CHANGES.md index 2661597461..4382c8f975 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,3 +1,92 @@ +Changes in Element X v0.5.1 (2024-08-28) +========================================= + +### ✨ Features +* Add simplified sliding sync toggle to developer options by @jmartinesp in https://github.com/element-hq/element-x-android/pull/3222 +* Feature: identity reset by @jmartinesp in https://github.com/element-hq/element-x-android/pull/3298 +* Timeline UI | MessageShield Support by @BillCarsonFr in https://github.com/element-hq/element-x-android/pull/3240 +* Suggestion for room alias (disabled for now) by @bmarty in https://github.com/element-hq/element-x-android/pull/3322 +* Allow `PictureInPicture` mode for Element Call. by @bmarty in https://github.com/element-hq/element-x-android/pull/3345 + +### 🙌 Improvements +* Join Room : allow to join by alias (and getPreview) by @ganfra in https://github.com/element-hq/element-x-android/pull/3241 +* [Feature] Pinned message : render m.room.pinned events in timeline by @ganfra in https://github.com/element-hq/element-x-android/pull/3276 +* Enable sync on push feature flag to partially sync when notifications arrive by @jmartinesp in https://github.com/element-hq/element-x-android/pull/3290 +* Improve the text for mentions and replies in notifications by @jmartinesp in https://github.com/element-hq/element-x-android/pull/3328 +* Use new functions exposed by Element Call about PiP by @bmarty in https://github.com/element-hq/element-x-android/pull/3334 + +### 🐛 Bugfixes +* Ensure sessionPath is not reused for different homeserver. Fixes not loading media issue. by @bmarty in https://github.com/element-hq/element-x-android/pull/3299 +* Fix reset identity with password stuck in loading state. by @jmartinesp in https://github.com/element-hq/element-x-android/pull/3317 + +### 🗣 Translations +* Sync Strings by @ElementBot in https://github.com/element-hq/element-x-android/pull/3252 +* Sync Strings by @ElementBot in https://github.com/element-hq/element-x-android/pull/3267 +* Sync Strings by @ElementBot in https://github.com/element-hq/element-x-android/pull/3297 +* Sync Strings - New language: Dutch. by @ElementBot in https://github.com/element-hq/element-x-android/pull/3308 +* Sync Strings by @ElementBot in https://github.com/element-hq/element-x-android/pull/3339 + +### 🧱 Build +* Update sonarcloud project key by @guillaumevillemont in https://github.com/element-hq/element-x-android/pull/3264 +* Fix `build_rust_sdk.sh` script to work on linux by @erikjohnston in https://github.com/element-hq/element-x-android/pull/3291 +* Fix proguard config for nightly and release builds by @jmartinesp in https://github.com/element-hq/element-x-android/pull/3294 +* Gradle update action: Use JDK 17 and skip early in forks. by @bmarty in https://github.com/element-hq/element-x-android/pull/3311 +* Gradle update action: add label and use other token. by @bmarty in https://github.com/element-hq/element-x-android/pull/3313 +* Update Gradle Wrapper from 8.9 to 8.10 by @ElementBot in https://github.com/element-hq/element-x-android/pull/3314 + +### 🚧 In development 🚧 +* WIP Pinned events : add feature flag and pin/unpin actions by @ganfra in https://github.com/element-hq/element-x-android/pull/3255 +* WIP Pinned events : start creating the banner ui, no logic. by @ganfra in https://github.com/element-hq/element-x-android/pull/3259 +* WIP Pinned events : banner logic by @ganfra in https://github.com/element-hq/element-x-android/pull/3275 + +### Dependency upgrades +* Update dependency org.maplibre.gl:android-sdk to v11.1.0 by @renovate in https://github.com/element-hq/element-x-android/pull/3244 +* Update activity to v1.9.1 by @renovate in https://github.com/element-hq/element-x-android/pull/3242 +* Update media3 to v1.4.0 by @renovate in https://github.com/element-hq/element-x-android/pull/3247 +* Update dependency androidx.annotation:annotation-jvm to v1.8.1 by @renovate in https://github.com/element-hq/element-x-android/pull/3243 +* Update dependencyAnalysis to v1.33.0 by @renovate in https://github.com/element-hq/element-x-android/pull/3250 +* Update dependency org.matrix.rustcomponents:sdk-android to v0.2.35 by @renovate in https://github.com/element-hq/element-x-android/pull/3249 +* Update dependency io.sentry:sentry-android to v7.12.1 by @renovate in https://github.com/element-hq/element-x-android/pull/3246 +* Update dependency io.nlopez.compose.rules:detekt to v0.4.8 by @renovate in https://github.com/element-hq/element-x-android/pull/3254 +* Update dependency org.matrix.rustcomponents:sdk-android to v0.2.36 by @renovate in https://github.com/element-hq/element-x-android/pull/3269 +* Update wysiwyg to v2.37.8 by @renovate in https://github.com/element-hq/element-x-android/pull/3263 +* Update dependency io.sentry:sentry-android to v7.13.0 by @renovate in https://github.com/element-hq/element-x-android/pull/3258 +* Update dependency io.nlopez.compose.rules:detekt to v0.4.9 by @renovate in https://github.com/element-hq/element-x-android/pull/3277 +* Update dependency org.matrix.rustcomponents:sdk-android to v0.2.38 by @renovate in https://github.com/element-hq/element-x-android/pull/3280 +* Update dependency androidx.annotation:annotation-jvm to v1.8.2 by @renovate in https://github.com/element-hq/element-x-android/pull/3282 +* Update kotlin by @renovate in https://github.com/element-hq/element-x-android/pull/2990 +* Update dependency io.nlopez.compose.rules:detekt to v0.4.10 by @renovate in https://github.com/element-hq/element-x-android/pull/3281 +* Update dependency com.posthog:posthog-android to v3.5.0 by @renovate in https://github.com/element-hq/element-x-android/pull/3287 +* Update wysiwyg to v2.37.8 by @renovate in https://github.com/element-hq/element-x-android/pull/3284 +* Update the SDK bindings to `v0.2.39` by @jmartinesp in https://github.com/element-hq/element-x-android/pull/3288 +* Update gradle/actions action to v4 by @renovate in https://github.com/element-hq/element-x-android/pull/3265 +* Update android.gradle.plugin to v8.5.2 by @renovate in https://github.com/element-hq/element-x-android/pull/3004 +* Update dependency io.sentry:sentry-android to v7.13.0 by @renovate in https://github.com/element-hq/element-x-android/pull/3285 +* Update dependency io.sentry:sentry-android to v7.14.0 by @renovate in https://github.com/element-hq/element-x-android/pull/3302 +* Update dependency androidx.test:runner to v1.6.2 by @renovate in https://github.com/element-hq/element-x-android/pull/3304 +* Update dependency com.otaliastudios:transcoder to v0.11.0 by @renovate in https://github.com/element-hq/element-x-android/pull/3306 +* Update lifecycle to v2.8.0 by @renovate in https://github.com/element-hq/element-x-android/pull/2848 +* Update lifecycle to v2.8.4 by @renovate in https://github.com/element-hq/element-x-android/pull/3315 +* Update dagger to v2.52 by @renovate in https://github.com/element-hq/element-x-android/pull/3270 +* Update telephoto to v0.13.0 by @renovate in https://github.com/element-hq/element-x-android/pull/3325 +* Update dependency androidx.compose:compose-bom to v2024.08.00 by @renovate in https://github.com/element-hq/element-x-android/pull/3323 +* Update dependency com.google.firebase:firebase-bom to v33.2.0 by @renovate in https://github.com/element-hq/element-x-android/pull/3331 +* Update dependency com.posthog:posthog-android to v3.5.1 by @renovate in https://github.com/element-hq/element-x-android/pull/3340 +* Update dependency com.android.tools:desugar_jdk_libs to v2.1.0 by @renovate in https://github.com/element-hq/element-x-android/pull/3341 +* Update dependencyAnalysis to v2 (major) by @renovate in https://github.com/element-hq/element-x-android/pull/3346 +* Update dependency org.maplibre.gl:android-sdk to v11.2.0 by @renovate in https://github.com/element-hq/element-x-android/pull/3347 +* Update media3 to v1.4.1 by @renovate in https://github.com/element-hq/element-x-android/pull/3344 +* Update dependency org.matrix.rustcomponents:sdk-android to v0.2.40 by @renovate in https://github.com/element-hq/element-x-android/pull/3343 + +### Others +* Feature/fga/push subscribe to room by @ganfra in https://github.com/element-hq/element-x-android/pull/3257 +* Feature/fga/start sync on push by @ganfra in https://github.com/element-hq/element-x-android/pull/3260 +* Cleanup and add unit test for DefaultPinnedMessagesBannerFormatter by @bmarty in https://github.com/element-hq/element-x-android/pull/3307 +* Add test on function name which may start or end with spaces by @bmarty in https://github.com/element-hq/element-x-android/pull/3318 +* Fix broken direct room member for rooms with old users that left by @networkException in https://github.com/element-hq/element-x-android/pull/3324 +* Add unit test on MatrixRoom extension by @bmarty in https://github.com/element-hq/element-x-android/pull/3327 +* Fix login navigation getting stuck when the app was compiled with no-op analytics provider by @SpiritCroc in https://github.com/element-hq/element-x-android/pull/3337 + Changes in Element X v0.5.0 (2024-07-24) ========================================= diff --git a/app/build.gradle.kts b/app/build.gradle.kts index 7778a3246e..49641a16cd 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -17,15 +17,19 @@ @file:Suppress("UnstableApiUsage") import com.android.build.api.variant.FilterConfiguration.FilterType.ABI +import com.android.build.gradle.internal.tasks.factory.dependsOn +import com.android.build.gradle.tasks.GenerateBuildConfig +import extension.AssetCopyTask +import extension.GitBranchNameValueSource +import extension.GitRevisionValueSource import extension.allEnterpriseImpl import extension.allFeaturesImpl import extension.allLibrariesImpl import extension.allServicesImpl -import extension.gitBranchName -import extension.gitRevision import extension.koverDependencies import extension.locales import extension.setupKover +import java.util.Locale plugins { id("io.element.android-compose-application") @@ -36,7 +40,8 @@ plugins { id(libs.plugins.firebaseAppDistribution.get().pluginId) alias(libs.plugins.knit) id("kotlin-parcelize") - id("com.google.android.gms.oss-licenses-plugin") + alias(libs.plugins.licensee) + alias(libs.plugins.kotlin.serialization) // To be able to update the firebase.xml files, uncomment and build the project // id("com.google.gms.google-services") } @@ -61,9 +66,6 @@ android { abiFilters += listOf("armeabi-v7a", "x86", "arm64-v8a", "x86_64") } - buildConfigField("String", "GIT_REVISION", "\"${gitRevision()}\"") - buildConfigField("String", "GIT_BRANCH_NAME", "\"${gitBranchName()}\"") - // Ref: https://developer.android.com/studio/build/configure-apk-splits.html#configure-abi-split splits { // Configures multiple APKs based on ABI. @@ -215,6 +217,9 @@ androidComponents { output.versionCode.set((output.versionCode.orNull ?: 0) * 10 + abiCode) } } + + val reportingExtension: ReportingExtension = project.extensions.getByType(ReportingExtension::class.java) + configureLicensesTasks(reportingExtension) } // Knit @@ -259,8 +264,6 @@ dependencies { // Comment to not include unified push in the project implementation(projects.libraries.pushproviders.unifiedpush) - "gplayImplementation"(libs.play.services.oss.licenses) - implementation(libs.appyx.core) implementation(libs.androidx.splash) implementation(libs.androidx.core) @@ -291,3 +294,51 @@ dependencies { koverDependencies() } + +tasks.withType().configureEach { + outputs.upToDateWhen { false } + val gitRevision = providers.of(GitRevisionValueSource::class.java) {}.get() + val gitBranchName = providers.of(GitBranchNameValueSource::class.java) {}.get() + android.defaultConfig.buildConfigField("String", "GIT_REVISION", "\"$gitRevision\"") + android.defaultConfig.buildConfigField("String", "GIT_BRANCH_NAME", "\"$gitBranchName\"") +} + +licensee { + allow("Apache-2.0") + allow("MIT") + allow("GPL-2.0-with-classpath-exception") + allow("BSD-2-Clause") + allowUrl("https://opensource.org/licenses/MIT") + allowUrl("https://developer.android.com/studio/terms.html") + allowUrl("http://openjdk.java.net/legal/gplv2+ce.html") + allowUrl("https://www.zetetic.net/sqlcipher/license/") + allowUrl("https://jsoup.org/license") + allowUrl("https://asm.ow2.io/license.html") + ignoreDependencies("com.github.matrix-org", "matrix-analytics-events") +} + +fun Project.configureLicensesTasks(reportingExtension: ReportingExtension) { + androidComponents { + onVariants { variant -> + val capitalizedVariantName = variant.name.replaceFirstChar { + if (it.isLowerCase()) { + it.titlecase(Locale.getDefault()) + } else { + it.toString() + } + } + val artifactsFile = reportingExtension.file("licensee/android$capitalizedVariantName/artifacts.json") + + val copyArtifactsTask = + project.tasks.register("copy${capitalizedVariantName}LicenseeReportToAssets") { + inputFile.set(artifactsFile) + targetFileName.set("licensee-artifacts.json") + } + variant.sources.assets?.addGeneratedSourceDirectory( + copyArtifactsTask, + AssetCopyTask::outputDirectory, + ) + copyArtifactsTask.dependsOn("licenseeAndroid$capitalizedVariantName") + } + } +} diff --git a/app/src/gplay/AndroidManifest.xml b/app/src/gplay/AndroidManifest.xml deleted file mode 100644 index 234003d953..0000000000 --- a/app/src/gplay/AndroidManifest.xml +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - - diff --git a/app/src/gplay/kotlin/io/element/android/x/licenses/OssOpenSourcesLicensesProvider.kt b/app/src/gplay/kotlin/io/element/android/x/licenses/OssOpenSourcesLicensesProvider.kt deleted file mode 100644 index 93848c438d..0000000000 --- a/app/src/gplay/kotlin/io/element/android/x/licenses/OssOpenSourcesLicensesProvider.kt +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Copyright (c) 2024 New Vector Ltd - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package io.element.android.x.licenses - -import android.app.Activity -import android.content.Intent -import com.google.android.gms.oss.licenses.OssLicensesMenuActivity -import com.squareup.anvil.annotations.ContributesBinding -import io.element.android.features.preferences.api.OpenSourceLicensesProvider -import io.element.android.libraries.di.AppScope -import io.element.android.libraries.ui.strings.CommonStrings -import javax.inject.Inject - -@ContributesBinding(AppScope::class) -class OssOpenSourcesLicensesProvider @Inject constructor() : OpenSourceLicensesProvider { - override val hasOpenSourceLicenses: Boolean = true - - override fun navigateToOpenSourceLicenses(activity: Activity) { - val title = activity.getString(CommonStrings.common_open_source_licenses) - OssLicensesMenuActivity.setActivityTitle(title) - activity.startActivity(Intent(activity, OssLicensesMenuActivity::class.java)) - } -} diff --git a/app/src/gplay/res/values-night/colors.xml b/app/src/gplay/res/values-night/colors.xml deleted file mode 100644 index e830bc1cb1..0000000000 --- a/app/src/gplay/res/values-night/colors.xml +++ /dev/null @@ -1,32 +0,0 @@ - - - - - - - #FF101317 - - #FFEBEEF2 - - #ff808994 - - #FF4187EB - - false - false - - diff --git a/app/src/gplay/res/values-v27/themes.xml b/app/src/gplay/res/values-v27/themes.xml deleted file mode 100644 index 99fe605d0a..0000000000 --- a/app/src/gplay/res/values-v27/themes.xml +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - - - - diff --git a/app/src/gplay/res/values/themes.xml b/app/src/gplay/res/values/themes.xml deleted file mode 100644 index 95f0429e0d..0000000000 --- a/app/src/gplay/res/values/themes.xml +++ /dev/null @@ -1,41 +0,0 @@ - - - - - - -