Skip to content

Commit

Permalink
Merge pull request #998 from tchapgouv/rebase/element-android-1.6.8
Browse files Browse the repository at this point in the history
Rebase against element android 1.6.8
  • Loading branch information
yostyle authored Dec 18, 2023
2 parents 781ef3e + cd98953 commit 1dff86c
Show file tree
Hide file tree
Showing 236 changed files with 1,101 additions and 23,553 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
strategy:
fail-fast: false
matrix:
target: [ GplayDevTchapRustCryptoWithoutvoipWithoutpinning, FdroidDevTchapRustCryptoWithoutvoipWithoutpinning, GplayBtchapRustCryptoWithvoipWithpinning ]
target: [ GplayDevTchapWithoutvoipWithoutpinning, FdroidDevTchapWithoutvoipWithoutpinning, GplayBtchapWithvoipWithpinning ]
# Allow all jobs on develop. Just one per PR.
concurrency:
group: ${{ github.ref == 'refs/heads/develop' && format('integration-tests-develop-{0}-{1}', matrix.target, github.sha) || format('build-debug-{0}-{1}', matrix.target, github.ref) }}
Expand Down Expand Up @@ -53,7 +53,7 @@ jobs:
strategy:
fail-fast: false
matrix:
target: [ GplayBtchapRustCryptoWithoutvoipWithpinning, GplayTchapRustCryptoWithoutvoipWithpinning, FdroidBtchapRustCryptoWithoutvoipWithoutpinning, FdroidTchapRustCryptoWithoutvoipWithoutpinning, GplayBtchapRustCryptoWithvoipWithpinning ]
target: [ GplayBtchapWithoutvoipWithpinning, GplayTchapWithoutvoipWithpinning, FdroidBtchapWithoutvoipWithoutpinning, FdroidTchapWithoutvoipWithoutpinning, GplayBtchapWithvoipWithpinning ]
concurrency:
# Tchap: custom group
group: ${{ github.ref == 'refs/head/main' && format('build-release-apk-main-{0}-{1}', github.sha, matrix.target) || startsWith(github.ref, 'refs/tags/tchap_v') && format('build-release-apk-tag-{0}-{1}', github.sha, matrix.target) }}
Expand Down Expand Up @@ -82,8 +82,8 @@ jobs:
needs: release
env:
# Tchap: only generate exodus report for the following target
TARGET_NAME: "GplayTchapRustCryptoWithoutvoipWithpinning"
TARGET_FOLDER: "gplayTchapRustCryptoWithoutvoipWithpinning"
TARGET_NAME: "GplayTchapWithoutvoipWithpinning"
TARGET_FOLDER: "gplayTchapWithoutvoipWithpinning"
steps:
- name: Obtain apk from artifact
id: download
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jobs:
yes n | towncrier build --version nightly
- name: Build and upload Gplay Nightly APK
run: |
./gradlew assembleGplayRustCryptoNightly appDistributionUploadGplayRustCryptoNightly $CI_GRADLE_ARG_PROPERTIES
./gradlew assembleGplayNightly appDistributionUploadGplayNightly $CI_GRADLE_ARG_PROPERTIES
env:
ELEMENT_ANDROID_NIGHTLY_KEYID: ${{ secrets.ELEMENT_ANDROID_NIGHTLY_KEYID }}
ELEMENT_ANDROID_NIGHTLY_KEYPASSWORD: ${{ secrets.ELEMENT_ANDROID_NIGHTLY_KEYPASSWORD }}
Expand Down
46 changes: 0 additions & 46 deletions .github/workflows/nightly_er.yml

This file was deleted.

4 changes: 2 additions & 2 deletions .github/workflows/quality.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,8 @@ jobs:
- name: Run lint
# Not always, if ktlint or detekt fail, avoid running the long lint check.
run: |
./gradlew vector-app:lintGplayBtchapRustCryptoWithoutvoipWithpinningRelease $CI_GRADLE_ARG_PROPERTIES
./gradlew vector-app:lintFdroidBtchapRustCryptoWithoutvoipWithoutpinningRelease $CI_GRADLE_ARG_PROPERTIES
./gradlew vector-app:lintGplayBtchapWithoutvoipWithpinningRelease $CI_GRADLE_ARG_PROPERTIES
./gradlew vector-app:lintFdroidBtchapWithoutvoipWithoutpinningRelease $CI_GRADLE_ARG_PROPERTIES
- name: Upload reports
if: always()
uses: actions/upload-artifact@v3
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/sanity_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ jobs:
touch emulator.log
chmod 777 emulator.log
adb logcat >> emulator.log &
./gradlew $CI_GRADLE_ARG_PROPERTIES -PallWarningsAsErrors=false connectedGplayBtchapRustCryptoWithoutvoipWithoutpinningDebugAndroidTest -Pandroid.testInstrumentationRunnerArguments.class=im.vector.app.ui.UiAllScreensSanityTest || adb pull storage/emulated/0/Pictures/failure_screenshots && exit 1
./gradlew $CI_GRADLE_ARG_PROPERTIES -PallWarningsAsErrors=false connectedGplayBtchapWithoutvoipWithoutpinningDebugAndroidTest -Pandroid.testInstrumentationRunnerArguments.class=im.vector.app.ui.UiAllScreensSanityTest || adb pull storage/emulated/0/Pictures/failure_screenshots && exit 1
- name: Upload Test Report Log
uses: actions/upload-artifact@v2
if: always()
Expand Down
36 changes: 17 additions & 19 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,25 +61,23 @@ jobs:
disableRateLimiting: true
public_baseurl: "http://10.0.2.2:8080/"

###- name: Run all the codecoverage tests at once
### uses: reactivecircus/android-emulator-runner@v2
### # continue-on-error: true
### with:
### api-level: ${{ matrix.api-level }}
### arch: x86
### profile: Nexus 5X
### target: playstore
### force-avd-creation: false
### emulator-options: -no-snapshot-save -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none
### disable-animations: true
### # emulator-build: 7425822
### script: |
### # Tchap : comment this task because CI failed
### # ./gradlew gatherGplayDebugStringTemplates $CI_GRADLE_ARG_PROPERTIES
### # ./gradlew unitTestsWithCoverage $CI_GRADLE_ARG_PROPERTIES
### ./gradlew instrumentationTestsWithCoverage $CI_GRADLE_ARG_PROPERTIES
### ./gradlew generateCoverageReport $CI_GRADLE_ARG_PROPERTIES

- name: Run all the codecoverage tests at once
uses: reactivecircus/android-emulator-runner@v2
# continue-on-error: true
with:
api-level: ${{ matrix.api-level }}
arch: x86
profile: Nexus 5X
target: playstore
force-avd-creation: false
emulator-options: -no-snapshot-save -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none
disable-animations: true
# emulator-build: 7425822
script: |
./gradlew gatherGplayTchapWithoutvoipWithpinningDebugStringTemplates $CI_GRADLE_ARG_PROPERTIES
./gradlew unitTestsWithCoverage $CI_GRADLE_ARG_PROPERTIES
./gradlew instrumentationTestsWithCoverage $CI_GRADLE_ARG_PROPERTIES
./gradlew generateCoverageReport $CI_GRADLE_ARG_PROPERTIES
# NB: continue-on-error marks steps.tests.conclusion = 'success' but leaves steps.tests.outcome = 'failure'
### - name: Run all the codecoverage tests at once (retry if emulator failed)
### uses: reactivecircus/android-emulator-runner@v2
Expand Down
18 changes: 18 additions & 0 deletions ELEMENT_CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,21 @@
Changes in Element v1.6.8 (2023-11-28)
======================================

Bugfixes 🐛
----------
- Stop incoming call ringing if the call is cancelled or answered on another session. ([#4066](https://github.com/vector-im/element-android/issues/4066))
- Ensure the incoming call will not ring forever, in case the call is not ended by another way. ([#8178](https://github.com/vector-im/element-android/issues/8178))
- Unified Push: Ignore the potential SSL error when the custom gateway is testing locally ([#8683](https://github.com/vector-im/element-android/issues/8683))
- Fix issue with timeline message view reuse while rich text editor is enabled ([#8688](https://github.com/vector-im/element-android/issues/8688))

Other changes
-------------
- Remove unused WebRTC dependency ([#8658](https://github.com/vector-im/element-android/issues/8658))
- Take into account boolean "io.element.disable_network_constraint" from the .well-known file. ([#8662](https://github.com/vector-im/element-android/issues/8662))
- Update regex for email address to be aligned on RFC 5322 ([#8671](https://github.com/vector-im/element-android/issues/8671))
- Bump crypto sdk bindings to v0.3.16 ([#8679](https://github.com/vector-im/element-android/issues/8679))


Changes in Element v1.6.6 (2023-10-05)
======================================

Expand Down
9 changes: 4 additions & 5 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -310,11 +310,10 @@ tasks.register("recordScreenshots", GradleBuild) {
tasks = [':vector:recordPaparazziDebug']
}

// Tchap: remove task not found
//tasks.register("verifyScreenshots", GradleBuild) {
// startParameter.projectProperties.screenshot = ""
// tasks = [':vector:verifyPaparazziDebug']
//}
tasks.register("verifyScreenshots", GradleBuild) {
startParameter.projectProperties.screenshot = ""
tasks = [':vector:verifyPaparazziDebug']
}

ext.initScreenshotTests = { project ->
def hasScreenshots = project.hasProperty("screenshot")
Expand Down
1 change: 1 addition & 0 deletions changelog.d/998.improvements
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Rebase against Element-Android v1.6.8
8 changes: 1 addition & 7 deletions coverage.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -88,11 +88,5 @@ task unitTestsWithCoverage(type: GradleBuild) {
task instrumentationTestsWithCoverage(type: GradleBuild) {
startParameter.projectProperties.coverage = "true"
startParameter.projectProperties['android.testInstrumentationRunnerArguments.notPackage'] = 'im.vector.app.ui'
tasks = [':vector-app:connectedGplayKotlinCryptoDebugAndroidTest', ':vector:connectedKotlinCryptoDebugAndroidTest'/*, 'matrix-sdk-android:connectedKotlinCryptoDebugAndroidTest'*/]
}

task instrumentationTestsRustWithCoverage(type: GradleBuild) {
startParameter.projectProperties.coverage = "true"
startParameter.projectProperties['android.testInstrumentationRunnerArguments.notPackage'] = 'im.vector.app.ui'
tasks = [':vector-app:connectedGplayRustCryptoDebugAndroidTest', ':vector:connectedRustCryptoDebugAndroidTest'/*, 'matrix-sdk-android:connectedRustCryptoDebugAndroidTest'*/]
tasks = [':vector-app:connectedGplayBtchapWithoutvoipWithoutpinningDebugAndroidTest', ':vector:connectedGplayBtchapWithoutvoipWithoutpinningDebugAndroidTest'/*, 'matrix-sdk-android:connectedDebugAndroidTest'*/]
}
4 changes: 2 additions & 2 deletions dependencies.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ def lifecycle = "2.5.1"
def flowBinding = "1.2.0"
def flipper = "0.190.0"
def epoxy = "5.0.0"
def mavericks = "3.0.2"
def mavericks = "3.0.7"
def glide = "4.15.1"
def bigImageViewer = "1.8.1"
def jjwt = "0.11.5"
Expand Down Expand Up @@ -101,7 +101,7 @@ ext.libs = [
],
element : [
'opusencoder' : "io.element.android:opusencoder:1.1.0",
'wysiwyg' : "io.element.android:wysiwyg:2.2.2"
'wysiwyg' : "io.element.android:wysiwyg:2.14.1"
],
squareup : [
'moshi' : "com.squareup.moshi:moshi:$moshi",
Expand Down
2 changes: 1 addition & 1 deletion docs/nightly_build.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ mv towncrier.toml towncrier.toml.bak
sed 's/CHANGES\.md/CHANGES_NIGHTLY\.md/' towncrier.toml.bak > towncrier.toml
rm towncrier.toml.bak
yes n | towncrier build --version nightly
./gradlew assembleGplayRustCryptoNightly appDistributionUploadRustKotlinCryptoNightly $CI_GRADLE_ARG_PROPERTIES
./gradlew assembleGplayNightly appDistributionUploadNightly $CI_GRADLE_ARG_PROPERTIES
```

Then you can reset the change on the codebase.
2 changes: 2 additions & 0 deletions fastlane/metadata/android/en-US/changelogs/40106080.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Main changes in this version: Bugfixes.
Full changelog: https://github.com/vector-im/element-android/releases
20 changes: 0 additions & 20 deletions flavor.gradle

This file was deleted.

2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -42,4 +42,4 @@ signing.element.nightly.keyPassword=Secret

# Customise the Lint version to use a more recent version than the one bundled with AGP
# https://googlesamples.github.io/android-custom-lint-rules/usage/newer-lint.md.html
android.experimental.lint.version=8.0.0-alpha10
android.experimental.lint.version=8.3.0-alpha12
1 change: 0 additions & 1 deletion matrix-sdk-android-flow/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ plugins {
id 'com.android.library'
id 'org.jetbrains.kotlin.android'
}
apply from: '../flavor.gradle'

android {
namespace "org.matrix.android.sdk.flow"
Expand Down
9 changes: 4 additions & 5 deletions matrix-sdk-android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ dokkaHtml {
}
}
}
apply from: '../flavor.gradle'

android {
namespace "org.matrix.android.sdk"
Expand All @@ -63,7 +62,7 @@ android {
// that the app's state is completely cleared between tests.
testInstrumentationRunnerArguments clearPackageData: 'true'

buildConfigField "String", "SDK_VERSION", "\"1.6.6\""
buildConfigField "String", "SDK_VERSION", "\"1.6.8\""

buildConfigField "String", "GIT_SDK_REVISION", "\"${gitRevision()}\""
buildConfigField "String", "GIT_SDK_REVISION_UNIX_DATE", "\"${gitRevisionUnixDate()}\""
Expand Down Expand Up @@ -158,7 +157,7 @@ dependencies {
// implementation libs.androidx.appCompat
implementation libs.androidx.core

rustCryptoImplementation libs.androidx.lifecycleLivedata
implementation libs.androidx.lifecycleLivedata

// Lifecycle
implementation libs.androidx.lifecycleCommon
Expand Down Expand Up @@ -217,8 +216,8 @@ dependencies {

implementation libs.google.phonenumber

rustCryptoImplementation("org.matrix.rustcomponents:crypto-android:0.3.15")
// rustCryptoApi project(":library:rustCrypto")
implementation("org.matrix.rustcomponents:crypto-android:0.3.16")
// api project(":library:rustCrypto")

testImplementation libs.tests.junit
// Note: version sticks to 1.9.2 due to https://github.com/mockk/mockk/issues/281
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,7 @@ class CryptoTestHelper(val testHelper: CommonTestHelper) {
return MegolmBackupCreationInfo(
algorithm = MXCRYPTO_ALGORITHM_MEGOLM_BACKUP,
authData = createFakeMegolmBackupAuthData(),
recoveryKey = BackupUtils.recoveryKeyFromPassphrase("3cnTdW")!!
recoveryKey = BackupUtils.recoveryKeyFromPassphrase("3cnTdW")
)
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,12 @@ import org.junit.Test
import org.junit.runner.RunWith
import org.junit.runners.JUnit4
import org.junit.runners.MethodSorters
import org.matrix.android.sdk.BuildConfig
import org.matrix.android.sdk.InstrumentedTest
import org.matrix.android.sdk.api.query.QueryStringValue
import org.matrix.android.sdk.api.session.Session
import org.matrix.android.sdk.api.session.events.model.EventType
import org.matrix.android.sdk.api.session.events.model.toContent
import org.matrix.android.sdk.api.session.events.model.toModel
import org.matrix.android.sdk.api.session.getRoom
import org.matrix.android.sdk.api.session.room.Room
import org.matrix.android.sdk.api.session.room.failure.JoinRoomFailure
import org.matrix.android.sdk.api.session.room.model.Membership
Expand Down Expand Up @@ -197,7 +195,6 @@ class E2eeShareKeysHistoryTest : InstrumentedTest {

@Test
fun testNeedsRotationFromSharedToWorldReadable() {
Assume.assumeTrue("Test is flacky on legacy crypto", BuildConfig.FLAVOR == "rustCrypto")
testRotationDueToVisibilityChange(RoomHistoryVisibility.SHARED, RoomHistoryVisibilityContent("world_readable"))
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -542,7 +542,7 @@ class KeysBackupTest : InstrumentedTest {
assertFails {
testData.aliceSession2.cryptoService().keysBackupService().trustKeysBackupVersionWithRecoveryKey(
testData.aliceSession2.cryptoService().keysBackupService().keysBackupVersion!!,
BackupUtils.recoveryKeyFromPassphrase("Bad recovery key")!!,
BackupUtils.recoveryKeyFromPassphrase("Bad recovery key"),
)
}

Expand Down Expand Up @@ -680,7 +680,7 @@ class KeysBackupTest : InstrumentedTest {
assertFailsWith<InvalidParameterException> {
keysBackupService.restoreKeysWithRecoveryKey(
keysBackupService.keysBackupVersion!!,
BackupUtils.recoveryKeyFromBase58("EsTc LW2K PGiF wKEA 3As5 g5c4 BXwk qeeJ ZJV8 Q9fu gUMN UE4d")!!,
BackupUtils.recoveryKeyFromBase58("EsTc LW2K PGiF wKEA 3As5 g5c4 BXwk qeeJ ZJV8 Q9fu gUMN UE4d"),
null,
null,
null,
Expand Down

This file was deleted.

Loading

0 comments on commit 1dff86c

Please sign in to comment.