From 362ed0f25dc4e15d1a52cf09aba26a340497d032 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sun, 18 Jan 2026 20:03:15 +0000 Subject: [PATCH 1/8] Bump com.android.application from 8.13.2 to 9.0.0 Bumps com.android.application from 8.13.2 to 9.0.0. --- updated-dependencies: - dependency-name: com.android.application dependency-version: 9.0.0 dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- build.gradle.kts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.gradle.kts b/build.gradle.kts index 66f0dbc37..5e37a513d 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -6,7 +6,7 @@ // Top-level build file where you can add configuration options common to all sub-projects/modules. plugins { - id("com.android.application") version "8.13.2" apply false + id("com.android.application") version "9.0.0" apply false id("org.jetbrains.kotlin.android") version "2.3.0" apply false id("androidx.navigation.safeargs.kotlin") version "2.9.6" apply false id("com.starter.easylauncher") version "6.4.1" apply false From bd8ef984b953643361bda2587e0501d5ae1fc79d Mon Sep 17 00:00:00 2001 From: Denys Bondarenko Date: Mon, 19 Jan 2026 20:34:28 +0200 Subject: [PATCH 2/8] Fixed compilation issues --- .idea/codeStyles/Project.xml | 34 ++++++ FlowCrypt/build.gradle.kts | 128 ++++++++++++++--------- build.gradle.kts | 6 +- gradle/wrapper/gradle-wrapper.properties | 2 +- 4 files changed, 116 insertions(+), 54 deletions(-) diff --git a/.idea/codeStyles/Project.xml b/.idea/codeStyles/Project.xml index a9f24734e..5ee440285 100644 --- a/.idea/codeStyles/Project.xml +++ b/.idea/codeStyles/Project.xml @@ -1,5 +1,39 @@ + + + diff --git a/FlowCrypt/build.gradle.kts b/FlowCrypt/build.gradle.kts index 788e74482..c8965198e 100644 --- a/FlowCrypt/build.gradle.kts +++ b/FlowCrypt/build.gradle.kts @@ -4,6 +4,10 @@ */ +import com.android.build.api.artifact.SingleArtifact +import com.android.build.api.variant.ResValue +import org.gradle.api.GradleException +import java.io.File import com.android.ddmlib.DdmPreferences import java.io.FileInputStream import java.text.SimpleDateFormat @@ -15,7 +19,6 @@ DdmPreferences.setTimeOut(10 * 60 * 1000) plugins { id("com.android.application") - id("kotlin-android") id("androidx.navigation.safeargs.kotlin") id("com.starter.easylauncher") id("kotlin-parcelize") @@ -30,7 +33,7 @@ if (propertiesFile.exists()) { } android { - compileSdk = extra["compileSdkVersion"] as Int + compileSdk = rootProject.extra["compileSdkVersion"] as Int namespace = "com.flowcrypt.email" defaultConfig { @@ -42,10 +45,10 @@ android { testInstrumentationRunnerArguments += mapOf("clearPackageData" to "true") applicationId = "com.flowcrypt.email" - minSdk = extra["minSdkVersion"] as Int - targetSdk = extra["targetSdkVersion"] as Int - versionCode = extra["appVersionCode"] as Int - versionName = extra["appVersionName"] as String + minSdk = rootProject.extra["minSdkVersion"] as Int + targetSdk = rootProject.extra["targetSdkVersion"] as Int + versionCode = rootProject.extra["appVersionCode"] as Int + versionName = rootProject.extra["appVersionName"] as String testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner" buildConfigField("int", "MIN_SDK_VERSION", "$minSdk") multiDexEnabled = true @@ -191,6 +194,7 @@ android { buildFeatures { buildConfig = true viewBinding = true + resValues = true } packaging { @@ -264,23 +268,89 @@ ksp { } androidComponents { + beforeVariants { variantBuilder -> - if (variantBuilder.name in listOf("devRelease", "devUiTests")) { - // Gradle ignores any variants that satisfy the conditions above. + if (variantBuilder.name in setOf("devRelease", "devUiTests")) { println("INFO: Excluded \"${variantBuilder.name}\" from build variant list as unused") variantBuilder.enable = false } } + // --- Applies to ALL variants --- onVariants { variant -> - //we share applicationId as a res value + // Share applicationId as a res value variant.resValues.put( variant.makeResValueKey("string", "application_id"), - com.android.build.api.variant.ResValue(variant.applicationId.get()) + ResValue(variant.applicationId.get()) ) } + + val releaseSelector = selector().withBuildType("release") + + // --- Release-only tasks --- + onVariants(releaseSelector) { variant -> + val cap = variant.name.replaceFirstChar { it.uppercase() } + + // APK output directory provider + val apkDirProvider = variant.artifacts.get(SingleArtifact.APK) + + fun listApks(): List { + val dir = apkDirProvider.get().asFile + return dir.walkTopDown().filter { it.isFile && it.extension == "apk" }.toList() + } + + val checkTask = tasks.register("check${cap}ApkSize") { + doLast { + val apks = listApks() + if (apks.isEmpty()) { + throw GradleException("No APK files found in: ${apkDirProvider.get().asFile.absolutePath}") + } + + val maxExpected = 50L * 1024L * 1024L + apks.forEach { apk -> + val size = apk.length() + if (size > maxExpected) { + throw GradleException( + "Release APK is bigger than expected. max=$maxExpected, actual=$size, file=${apk.name}" + ) + } + } + } + } + + val renameTask = tasks.register("rename${cap}Builds") { + doLast { + val apks = listApks() + if (apks.isEmpty()) { + logger.lifecycle("No APK files found to rename in: ${apkDirProvider.get().asFile.absolutePath}") + return@doLast + } + + val ts = SimpleDateFormat("yyyy_MM_dd_HH_mm").format(Date()) + + // If multiple outputs exist (splits), versionCode/versionName can differ; + // fallback to defaultConfig if not available. + val vCode = + variant.outputs.singleOrNull()?.versionCode?.orNull ?: android.defaultConfig.versionCode + val vName = + variant.outputs.singleOrNull()?.versionName?.orNull ?: android.defaultConfig.versionName + + apks.forEach { apk -> + val newName = apk.name.removeSuffix(".apk") + "_${vCode}_${vName}_${ts}.apk" + val target = apk.parentFile.resolve(newName) + + if (!apk.renameTo(target)) { + throw GradleException("Failed to rename ${apk.absolutePath} -> ${target.absolutePath}") + } else { + logger.lifecycle("Renamed: ${apk.name} -> ${target.name}") + } + } + } + } + } } + easylauncher { buildTypes { register("debug") { @@ -345,44 +415,6 @@ tasks.register("checkCorrectBranch") { } } -tasks.register("checkReleaseBuildsSize") { - doLast { - android.applicationVariants.forEach { applicationVariant -> - if (applicationVariant.buildType.name == "release") { - applicationVariant.outputs.forEach { variantOutput -> - val apkFile = variantOutput.outputFile - //for now apk up to 50Mb is normal - val maxExpectedSizeInBytes = 50 * 1024 * 1024 - if (apkFile.length() > maxExpectedSizeInBytes) { - throw GradleException( - "The generated release build is bigger then expected: " + - "expected = not big then $maxExpectedSizeInBytes, actual = ${apkFile.length()}" - ) - } - } - } - } - } -} - -tasks.register("renameReleaseBuilds") { - doLast { - android.applicationVariants.forEach { applicationVariant -> - if (applicationVariant.buildType.name == "release") { - applicationVariant.outputs.forEach { variantOutput -> - val file = variantOutput.outputFile - val newName = file.name.replace( - ".apk", "_" + android.defaultConfig.versionCode + - "_" + android.defaultConfig.versionName + "_" - + SimpleDateFormat("yyyy_MM_dd_HH_mm").format(Date()) + ".apk" - ) - variantOutput.outputFile.renameTo(File(file.parent, newName)) - } - } - } - } -} - tasks.register("copyReleaseApks") { includeEmptyDirs = false diff --git a/build.gradle.kts b/build.gradle.kts index 5e37a513d..baf5d4e9b 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -4,17 +4,13 @@ */ // Top-level build file where you can add configuration options common to all sub-projects/modules. +apply(from = "$rootDir/ext.gradle.kts") plugins { id("com.android.application") version "9.0.0" apply false - id("org.jetbrains.kotlin.android") version "2.3.0" apply false id("androidx.navigation.safeargs.kotlin") version "2.9.6" apply false id("com.starter.easylauncher") version "6.4.1" apply false id("org.jetbrains.kotlin.plugin.parcelize") version "2.3.0" apply false id("com.google.devtools.ksp") version "2.3.4" apply false id("org.ajoberstar.grgit") version "5.3.3" apply false } - -subprojects { - apply(from = "$rootDir/ext.gradle.kts") -} diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index d7a18bace..768e4fe16 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -5,6 +5,6 @@ #Sat Aug 16 14:50:01 EEST 2025 distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.3-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-9.3.0-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists From e77b9773e1fcc38a0b91c1989087213c5461a70f Mon Sep 17 00:00:00 2001 From: Denys Bondarenko Date: Tue, 20 Jan 2026 20:47:32 +0200 Subject: [PATCH 3/8] Fixed compilation issues --- .../ComposeScreenExternalIntentsFlowTest.kt | 11 +++++----- .../email/ui/ComposeScreenFlowTest.kt | 7 +++---- .../email/ui/SearchMessagesFlowTest.kt | 6 ++---- ...dReplyWithServiceInfoAndOneFileFlowTest.kt | 3 +-- .../email/ui/base/BasePassphraseFlowTest.kt | 7 +++---- .../AddOtherAccountFragmentInIsolationTest.kt | 14 ++++++------- ...PrivateKeySecondFragmentInIsolationTest.kt | 6 ++---- .../EditContactFragmentInIsolationTest.kt | 7 +------ ...pientsFromSourceFragmentInIsolationTest.kt | 6 +----- .../ServerSettingsFragmentInIsolationTest.kt | 6 ++---- ...SettingsFragmentFirstRunInIsolationTest.kt | 11 ++-------- ...onEmptyAliasSignatureRunInIsolationTest.kt | 7 ++----- ...UpdatePrivateKeyFragmentInIsolationTest.kt | 20 +++++++------------ 13 files changed, 38 insertions(+), 73 deletions(-) diff --git a/FlowCrypt/src/androidTest/java/com/flowcrypt/email/ui/ComposeScreenExternalIntentsFlowTest.kt b/FlowCrypt/src/androidTest/java/com/flowcrypt/email/ui/ComposeScreenExternalIntentsFlowTest.kt index 2565059d8..dfbd40d7d 100644 --- a/FlowCrypt/src/androidTest/java/com/flowcrypt/email/ui/ComposeScreenExternalIntentsFlowTest.kt +++ b/FlowCrypt/src/androidTest/java/com/flowcrypt/email/ui/ComposeScreenExternalIntentsFlowTest.kt @@ -1,6 +1,6 @@ /* * © 2016-present FlowCrypt a.s. Limitations apply. Contact human@flowcrypt.com - * Contributors: DenBond7 + * Contributors: denbond7 */ package com.flowcrypt.email.ui @@ -42,9 +42,6 @@ import okhttp3.mockwebserver.Dispatcher import okhttp3.mockwebserver.MockResponse import okhttp3.mockwebserver.RecordedRequest import org.hamcrest.Matchers.allOf -import org.hamcrest.Matchers.emptyString -import org.hamcrest.Matchers.`is` -import org.hamcrest.Matchers.not import org.junit.After import org.junit.Before import org.junit.Rule @@ -463,7 +460,8 @@ class ComposeScreenExternalIntentsFlowTest : BaseTest() { .check(matches(withText(getRidOfCharacterSubstitutes(body.toString())))) } else { onView(withId(R.id.editTextEmailMessage)) - .check(matches(isDisplayed())).check(matches(withText(`is`(emptyString())))) + .check(matches(isDisplayed())) + .check(matches(withText(""))) } } @@ -474,7 +472,8 @@ class ComposeScreenExternalIntentsFlowTest : BaseTest() { .check(matches(withText(getRidOfCharacterSubstitutes(subject)))) } else { onView(withId(R.id.editTextEmailSubject)) - .check(matches(isDisplayed())).check(matches(withText(`is`(emptyString())))) + .check(matches(isDisplayed())) + .check(matches(withText(""))) } } diff --git a/FlowCrypt/src/androidTest/java/com/flowcrypt/email/ui/ComposeScreenFlowTest.kt b/FlowCrypt/src/androidTest/java/com/flowcrypt/email/ui/ComposeScreenFlowTest.kt index 481e6695d..b9d983e30 100644 --- a/FlowCrypt/src/androidTest/java/com/flowcrypt/email/ui/ComposeScreenFlowTest.kt +++ b/FlowCrypt/src/androidTest/java/com/flowcrypt/email/ui/ComposeScreenFlowTest.kt @@ -72,7 +72,6 @@ import org.apache.commons.io.FileUtils import org.hamcrest.Description import org.hamcrest.Matcher import org.hamcrest.Matchers.allOf -import org.hamcrest.Matchers.emptyString import org.hamcrest.Matchers.`is` import org.hamcrest.Matchers.not import org.junit.Assert.assertEquals @@ -152,7 +151,7 @@ class ComposeScreenFlowTest : BaseComposeScreenTest() { ) onView(withId(R.id.editTextEmailSubject)) .perform(scrollTo(), click(), typeText("subject"), clearText()) - .check(matches(withText(`is`(emptyString())))) + .check(matches(withText(""))) onView(withId(R.id.menuActionSend)) .check(matches(isDisplayed())) .perform(click()) @@ -177,7 +176,7 @@ class ComposeScreenFlowTest : BaseComposeScreenTest() { .perform(scrollTo(), click(), replaceText(EMAIL_SUBJECT)) onView(withId(R.id.editTextEmailMessage)) .perform(scrollTo(), click(), replaceText("")) - .check(matches(withText(`is`(emptyString())))) + .check(matches(withText(""))) Espresso.closeSoftKeyboard() onView(withId(R.id.menuActionSend)) .check(matches(isDisplayed())) @@ -265,7 +264,7 @@ class ComposeScreenFlowTest : BaseComposeScreenTest() { .check(matches(withRecyclerViewItemCount(1))) onView(withId(R.id.editTextEmailSubject)) .perform(scrollTo()) - .check(matches(withText(`is`(emptyString())))) + .check(matches(withText(""))) } @Test diff --git a/FlowCrypt/src/androidTest/java/com/flowcrypt/email/ui/SearchMessagesFlowTest.kt b/FlowCrypt/src/androidTest/java/com/flowcrypt/email/ui/SearchMessagesFlowTest.kt index b0cffddc5..3af7fbb77 100644 --- a/FlowCrypt/src/androidTest/java/com/flowcrypt/email/ui/SearchMessagesFlowTest.kt +++ b/FlowCrypt/src/androidTest/java/com/flowcrypt/email/ui/SearchMessagesFlowTest.kt @@ -1,6 +1,6 @@ /* * © 2016-present FlowCrypt a.s. Limitations apply. Contact human@flowcrypt.com - * Contributors: DenBond7 + * Contributors: denbond7 */ package com.flowcrypt.email.ui @@ -34,9 +34,7 @@ import com.flowcrypt.email.rules.RetryRule import com.flowcrypt.email.rules.ScreenshotTestRule import com.flowcrypt.email.ui.activity.MainActivity import com.flowcrypt.email.util.AccountDaoManager -import org.hamcrest.Matchers.`is` import org.hamcrest.Matchers.allOf -import org.hamcrest.Matchers.emptyString import org.hamcrest.Matchers.not import org.junit.Before import org.junit.Rule @@ -144,7 +142,7 @@ class SearchMessagesFlowTest : BaseTest() { onView(withId(androidx.appcompat.R.id.search_close_btn)) .perform(click()) onView(isAssignableFrom(EditText::class.java)) - .check(matches(withText(`is`(emptyString())))) + .check(matches(withText(""))) } companion object { diff --git a/FlowCrypt/src/androidTest/java/com/flowcrypt/email/ui/StandardReplyWithServiceInfoAndOneFileFlowTest.kt b/FlowCrypt/src/androidTest/java/com/flowcrypt/email/ui/StandardReplyWithServiceInfoAndOneFileFlowTest.kt index 2c8cc66fc..6ba082c26 100644 --- a/FlowCrypt/src/androidTest/java/com/flowcrypt/email/ui/StandardReplyWithServiceInfoAndOneFileFlowTest.kt +++ b/FlowCrypt/src/androidTest/java/com/flowcrypt/email/ui/StandardReplyWithServiceInfoAndOneFileFlowTest.kt @@ -1,6 +1,6 @@ /* * © 2016-present FlowCrypt a.s. Limitations apply. Contact human@flowcrypt.com - * Contributors: DenBond7 + * Contributors: denbond7 */ package com.flowcrypt.email.ui @@ -42,7 +42,6 @@ import com.flowcrypt.email.ui.activity.CreateMessageActivity import com.flowcrypt.email.util.AccountDaoManager import com.flowcrypt.email.util.TestGeneralUtil import org.hamcrest.Matchers.allOf -import org.hamcrest.Matchers.emptyString import org.hamcrest.Matchers.`is` import org.hamcrest.Matchers.not import org.junit.Rule diff --git a/FlowCrypt/src/androidTest/java/com/flowcrypt/email/ui/base/BasePassphraseFlowTest.kt b/FlowCrypt/src/androidTest/java/com/flowcrypt/email/ui/base/BasePassphraseFlowTest.kt index 030831e66..7e21d710e 100644 --- a/FlowCrypt/src/androidTest/java/com/flowcrypt/email/ui/base/BasePassphraseFlowTest.kt +++ b/FlowCrypt/src/androidTest/java/com/flowcrypt/email/ui/base/BasePassphraseFlowTest.kt @@ -1,6 +1,6 @@ /* * © 2016-present FlowCrypt a.s. Limitations apply. Contact human@flowcrypt.com - * Contributors: DenBond7 + * Contributors: denbond7 */ package com.flowcrypt.email.ui.base @@ -15,8 +15,6 @@ import androidx.test.espresso.matcher.ViewMatchers.isDisplayed import androidx.test.espresso.matcher.ViewMatchers.withId import androidx.test.espresso.matcher.ViewMatchers.withText import com.flowcrypt.email.R -import org.hamcrest.Matchers.emptyString -import org.hamcrest.Matchers.`is` import org.junit.Test /** @@ -102,6 +100,7 @@ abstract class BasePassphraseFlowTest : BaseCheckPassphraseOnFirstScreenFlowTest testShowRepeatingPassPhraseScreen() onView(withId(R.id.editTextKeyPasswordSecond)) - .check(matches(isDisplayed())).check(matches(withText(`is`(emptyString())))) + .check(matches(isDisplayed())) + .check(matches(withText(""))) } } diff --git a/FlowCrypt/src/androidTest/java/com/flowcrypt/email/ui/fragment/isolation/incontainer/AddOtherAccountFragmentInIsolationTest.kt b/FlowCrypt/src/androidTest/java/com/flowcrypt/email/ui/fragment/isolation/incontainer/AddOtherAccountFragmentInIsolationTest.kt index eab2bee12..5fdf76370 100644 --- a/FlowCrypt/src/androidTest/java/com/flowcrypt/email/ui/fragment/isolation/incontainer/AddOtherAccountFragmentInIsolationTest.kt +++ b/FlowCrypt/src/androidTest/java/com/flowcrypt/email/ui/fragment/isolation/incontainer/AddOtherAccountFragmentInIsolationTest.kt @@ -35,7 +35,6 @@ import com.flowcrypt.email.ui.activity.fragment.AddOtherAccountFragment import com.flowcrypt.email.ui.base.AddOtherAccountBaseTest import com.flowcrypt.email.util.AuthCredentialsManager import org.hamcrest.Matchers.allOf -import org.hamcrest.Matchers.emptyString import org.hamcrest.Matchers.instanceOf import org.hamcrest.Matchers.`is` import org.hamcrest.Matchers.not @@ -95,12 +94,12 @@ class AddOtherAccountFragmentInIsolationTest : AddOtherAccountBaseTest() { @Test fun testIsPasswordFieldsAlwaysEmptyAtStart() { onView(withId(R.id.editTextPassword)) - .check(matches(withText(`is`(emptyString())))) + .check(matches(withText(""))) enableAdvancedMode() onView(withId(R.id.checkBoxRequireSignInForSmtp)) .perform(scrollTo(), click()) onView(withId(R.id.editTextSmtpPassword)) - .check(matches(withText(`is`(emptyString())))) + .check(matches(withText(""))) } @Test @@ -190,7 +189,8 @@ class AddOtherAccountFragmentInIsolationTest : AddOtherAccountBaseTest() { .check(matches(isDisplayed())) onView(withId(R.id.editTextSmtpPassword)) .perform(scrollTo()) - .check(matches(isDisplayed())).check(matches(withText(`is`(emptyString())))) + .check(matches(isDisplayed())) + .check(matches(withText(""))) onView(withId(R.id.checkBoxRequireSignInForSmtp)) .perform(scrollTo(), click()) @@ -217,13 +217,13 @@ class AddOtherAccountFragmentInIsolationTest : AddOtherAccountBaseTest() { .perform(scrollTo(), clearText(), typeText(invalidEmailAddress), closeSoftKeyboard()) onView(withId(R.id.editTextUserName)) .perform(scrollTo()) - .check(matches(withText(`is`(emptyString())))) + .check(matches(withText(""))) onView(withId(R.id.editTextImapServer)) .perform(scrollTo()) - .check(matches(withText(`is`(emptyString())))) + .check(matches(withText(""))) onView(withId(R.id.editTextSmtpServer)) .perform(scrollTo()) - .check(matches(withText(`is`(emptyString())))) + .check(matches(withText(""))) } val text = userName + TestConstants.COMMERCIAL_AT_SYMBOL + host diff --git a/FlowCrypt/src/androidTest/java/com/flowcrypt/email/ui/fragment/isolation/incontainer/CreatePrivateKeySecondFragmentInIsolationTest.kt b/FlowCrypt/src/androidTest/java/com/flowcrypt/email/ui/fragment/isolation/incontainer/CreatePrivateKeySecondFragmentInIsolationTest.kt index b1572d6ea..97d34eac1 100644 --- a/FlowCrypt/src/androidTest/java/com/flowcrypt/email/ui/fragment/isolation/incontainer/CreatePrivateKeySecondFragmentInIsolationTest.kt +++ b/FlowCrypt/src/androidTest/java/com/flowcrypt/email/ui/fragment/isolation/incontainer/CreatePrivateKeySecondFragmentInIsolationTest.kt @@ -1,6 +1,6 @@ /* * © 2016-present FlowCrypt a.s. Limitations apply. Contact human@flowcrypt.com - * Contributors: DenBond7 + * Contributors: denbond7 */ package com.flowcrypt.email.ui.fragment.isolation.incontainer @@ -24,8 +24,6 @@ import com.flowcrypt.email.ui.activity.fragment.CreatePrivateKeySecondFragment import com.flowcrypt.email.ui.activity.fragment.CreatePrivateKeySecondFragmentArgs import com.flowcrypt.email.ui.base.AddAccountToDatabaseRuleInterface import com.flowcrypt.email.util.AccountDaoManager -import org.hamcrest.Matchers.emptyString -import org.hamcrest.Matchers.`is` import org.junit.Before import org.junit.Rule import org.junit.Test @@ -64,7 +62,7 @@ class CreatePrivateKeySecondFragmentInIsolationTest : BaseTest(), onView(withId(R.id.textViewSecondPasswordCheckTitle)) .check(matches(withText(getResString(R.string.set_up_flow_crypt, getResString(R.string.app_name))))) onView(withId(R.id.editTextKeyPasswordSecond)) - .check(matches(withText(`is`(emptyString())))) + .check(matches(withText(""))) onView(withId(R.id.buttonConfirmPassPhrases)) .perform(click()) diff --git a/FlowCrypt/src/androidTest/java/com/flowcrypt/email/ui/fragment/isolation/incontainer/EditContactFragmentInIsolationTest.kt b/FlowCrypt/src/androidTest/java/com/flowcrypt/email/ui/fragment/isolation/incontainer/EditContactFragmentInIsolationTest.kt index 3f7fb92b4..04a660421 100644 --- a/FlowCrypt/src/androidTest/java/com/flowcrypt/email/ui/fragment/isolation/incontainer/EditContactFragmentInIsolationTest.kt +++ b/FlowCrypt/src/androidTest/java/com/flowcrypt/email/ui/fragment/isolation/incontainer/EditContactFragmentInIsolationTest.kt @@ -17,7 +17,6 @@ import androidx.test.filters.MediumTest import com.flowcrypt.email.R import com.flowcrypt.email.base.BaseTest import com.flowcrypt.email.database.entity.PublicKeyEntity -import com.flowcrypt.email.junit.annotations.DependsOnMailServer import com.flowcrypt.email.junit.annotations.FlowCryptTestSettings import com.flowcrypt.email.rules.AddPrivateKeyToDatabaseRule import com.flowcrypt.email.rules.ClearAppSettingsRule @@ -27,10 +26,6 @@ import com.flowcrypt.email.rules.ScreenshotTestRule import com.flowcrypt.email.ui.activity.fragment.EditContactFragment import com.flowcrypt.email.ui.activity.fragment.EditContactFragmentArgs import com.flowcrypt.email.ui.base.AddAccountToDatabaseRuleInterface -import org.hamcrest.CoreMatchers.`is` -import org.hamcrest.CoreMatchers.startsWith -import org.hamcrest.Matchers -import org.hamcrest.Matchers.emptyString import org.junit.Before import org.junit.Rule import org.junit.Test @@ -75,7 +70,7 @@ class EditContactFragmentInIsolationTest : BaseTest(), AddAccountToDatabaseRuleI Thread.sleep(1000) onView(withId(R.id.editTextNewPubKey)) - .check(matches(withText(`is`(emptyString())))) + .check(matches(withText(""))) onView(withId(R.id.buttonCheck)) .check(matches(isNotEnabled())) diff --git a/FlowCrypt/src/androidTest/java/com/flowcrypt/email/ui/fragment/isolation/incontainer/ImportRecipientsFromSourceFragmentInIsolationTest.kt b/FlowCrypt/src/androidTest/java/com/flowcrypt/email/ui/fragment/isolation/incontainer/ImportRecipientsFromSourceFragmentInIsolationTest.kt index 75ae59fa6..a2347863f 100644 --- a/FlowCrypt/src/androidTest/java/com/flowcrypt/email/ui/fragment/isolation/incontainer/ImportRecipientsFromSourceFragmentInIsolationTest.kt +++ b/FlowCrypt/src/androidTest/java/com/flowcrypt/email/ui/fragment/isolation/incontainer/ImportRecipientsFromSourceFragmentInIsolationTest.kt @@ -21,10 +21,6 @@ import com.flowcrypt.email.rules.RetryRule import com.flowcrypt.email.rules.ScreenshotTestRule import com.flowcrypt.email.ui.activity.fragment.ImportRecipientsFromSourceFragment import com.flowcrypt.email.ui.base.AddAccountToDatabaseRuleInterface -import org.hamcrest.CoreMatchers -import org.hamcrest.CoreMatchers.`is` -import org.hamcrest.Matchers -import org.hamcrest.Matchers.emptyString import org.junit.Before import org.junit.Rule import org.junit.Test @@ -60,6 +56,6 @@ class ImportRecipientsFromSourceFragmentInIsolationTest : BaseTest(), Thread.sleep(1000) onView(withId(R.id.eTKeyIdOrEmail)) - .check(matches(withText(`is`(emptyString())))) + .check(matches(withText(""))) } } \ No newline at end of file diff --git a/FlowCrypt/src/androidTest/java/com/flowcrypt/email/ui/fragment/isolation/incontainer/ServerSettingsFragmentInIsolationTest.kt b/FlowCrypt/src/androidTest/java/com/flowcrypt/email/ui/fragment/isolation/incontainer/ServerSettingsFragmentInIsolationTest.kt index 37b9454ca..04c42227f 100644 --- a/FlowCrypt/src/androidTest/java/com/flowcrypt/email/ui/fragment/isolation/incontainer/ServerSettingsFragmentInIsolationTest.kt +++ b/FlowCrypt/src/androidTest/java/com/flowcrypt/email/ui/fragment/isolation/incontainer/ServerSettingsFragmentInIsolationTest.kt @@ -23,8 +23,6 @@ import com.flowcrypt.email.rules.RetryRule import com.flowcrypt.email.rules.ScreenshotTestRule import com.flowcrypt.email.ui.activity.fragment.ServerSettingsFragment import com.flowcrypt.email.ui.base.AddAccountToDatabaseRuleInterface -import org.hamcrest.Matchers.emptyString -import org.hamcrest.Matchers.`is` import org.junit.Before import org.junit.Rule import org.junit.Test @@ -66,7 +64,7 @@ class ServerSettingsFragmentInIsolationTest : BaseTest(), AddAccountToDatabaseRu .check(matches(isNotEnabled())) .check(matches(withText(account.username))) onView(withId(R.id.editTextPassword)) - .check(matches(withText(`is`(emptyString())))) + .check(matches(withText(""))) onView(withId(R.id.editTextImapServer)) .check(matches(withText(account.imapServer))) onView(withId(R.id.editTextImapPort)) @@ -81,6 +79,6 @@ class ServerSettingsFragmentInIsolationTest : BaseTest(), AddAccountToDatabaseRu onView(withId(R.id.editTextSmtpUsername)) .check(matches(withText(account.smtpUsername))) onView(withId(R.id.editTextSmtpPassword)) - .check(matches(withText(`is`(emptyString())))) + .check(matches(withText(""))) } } diff --git a/FlowCrypt/src/androidTest/java/com/flowcrypt/email/ui/fragment/isolation/incontainer/SignatureSettingsFragmentFirstRunInIsolationTest.kt b/FlowCrypt/src/androidTest/java/com/flowcrypt/email/ui/fragment/isolation/incontainer/SignatureSettingsFragmentFirstRunInIsolationTest.kt index 5001197e1..a8e2a0e8d 100644 --- a/FlowCrypt/src/androidTest/java/com/flowcrypt/email/ui/fragment/isolation/incontainer/SignatureSettingsFragmentFirstRunInIsolationTest.kt +++ b/FlowCrypt/src/androidTest/java/com/flowcrypt/email/ui/fragment/isolation/incontainer/SignatureSettingsFragmentFirstRunInIsolationTest.kt @@ -1,14 +1,12 @@ /* * © 2016-present FlowCrypt a.s. Limitations apply. Contact human@flowcrypt.com - * Contributors: DenBond7 + * Contributors: denbond7 */ package com.flowcrypt.email.ui.fragment.isolation.incontainer import androidx.test.espresso.Espresso.onView -import androidx.test.espresso.action.ViewActions.click import androidx.test.espresso.assertion.ViewAssertions.matches -import androidx.test.espresso.matcher.ViewMatchers.isDisplayed import androidx.test.espresso.matcher.ViewMatchers.withId import androidx.test.espresso.matcher.ViewMatchers.withText import androidx.test.ext.junit.runners.AndroidJUnit4 @@ -16,8 +14,6 @@ import androidx.test.filters.MediumTest import com.flowcrypt.email.R import com.flowcrypt.email.base.BaseTest import com.flowcrypt.email.junit.annotations.FlowCryptTestSettings -import com.flowcrypt.email.matchers.CustomMatchers.Companion.withEmptyRecyclerView -import com.flowcrypt.email.matchers.CustomMatchers.Companion.withRecyclerViewItemCount import com.flowcrypt.email.rules.AddAccountToDatabaseRule import com.flowcrypt.email.rules.AddPrivateKeyToDatabaseRule import com.flowcrypt.email.rules.ClearAppSettingsRule @@ -25,9 +21,6 @@ import com.flowcrypt.email.rules.GrantPermissionRuleChooser import com.flowcrypt.email.rules.RetryRule import com.flowcrypt.email.rules.ScreenshotTestRule import com.flowcrypt.email.ui.activity.fragment.SignatureSettingsFragment -import org.hamcrest.Matchers.emptyString -import org.hamcrest.Matchers.`is` -import org.hamcrest.Matchers.not import org.junit.Rule import org.junit.Test import org.junit.rules.RuleChain @@ -62,6 +55,6 @@ class SignatureSettingsFragmentFirstRunInIsolationTest : BaseTest() { ) onView(withId(R.id.editTextSignature)) - .check(matches(withText(`is`(emptyString())))) + .check(matches(withText(""))) } } diff --git a/FlowCrypt/src/androidTest/java/com/flowcrypt/email/ui/fragment/isolation/incontainer/SignatureSettingsFragmentNonEmptyAliasSignatureRunInIsolationTest.kt b/FlowCrypt/src/androidTest/java/com/flowcrypt/email/ui/fragment/isolation/incontainer/SignatureSettingsFragmentNonEmptyAliasSignatureRunInIsolationTest.kt index af5b1714a..571a7a6cd 100644 --- a/FlowCrypt/src/androidTest/java/com/flowcrypt/email/ui/fragment/isolation/incontainer/SignatureSettingsFragmentNonEmptyAliasSignatureRunInIsolationTest.kt +++ b/FlowCrypt/src/androidTest/java/com/flowcrypt/email/ui/fragment/isolation/incontainer/SignatureSettingsFragmentNonEmptyAliasSignatureRunInIsolationTest.kt @@ -1,13 +1,12 @@ /* * © 2016-present FlowCrypt a.s. Limitations apply. Contact human@flowcrypt.com - * Contributors: DenBond7 + * Contributors: denbond7 */ package com.flowcrypt.email.ui.fragment.isolation.incontainer import androidx.test.espresso.Espresso.onView import androidx.test.espresso.action.ViewActions.click -import androidx.test.espresso.assertion.ViewAssertions.doesNotExist import androidx.test.espresso.assertion.ViewAssertions.matches import androidx.test.espresso.matcher.ViewMatchers.isChecked import androidx.test.espresso.matcher.ViewMatchers.isDisplayed @@ -32,8 +31,6 @@ import com.flowcrypt.email.rules.ScreenshotTestRule import com.flowcrypt.email.ui.activity.fragment.SignatureSettingsFragment import com.flowcrypt.email.util.AccountDaoManager import com.flowcrypt.email.util.UIUtil -import org.hamcrest.Matchers.emptyString -import org.hamcrest.Matchers.`is` import org.hamcrest.Matchers.not import org.junit.Rule import org.junit.Test @@ -113,7 +110,7 @@ class SignatureSettingsFragmentNonEmptyAliasSignatureRunInIsolationTest : BaseTe ) onView(withId(R.id.editTextSignature)) - .check(matches(withText(`is`(emptyString())))) + .check(matches(withText(""))) onView(withId(R.id.switchUseGmailAliases)) .check(matches(isChecked())) diff --git a/FlowCrypt/src/androidTest/java/com/flowcrypt/email/ui/fragment/isolation/incontainer/UpdatePrivateKeyFragmentInIsolationTest.kt b/FlowCrypt/src/androidTest/java/com/flowcrypt/email/ui/fragment/isolation/incontainer/UpdatePrivateKeyFragmentInIsolationTest.kt index 53d8d4433..f90b23b7d 100644 --- a/FlowCrypt/src/androidTest/java/com/flowcrypt/email/ui/fragment/isolation/incontainer/UpdatePrivateKeyFragmentInIsolationTest.kt +++ b/FlowCrypt/src/androidTest/java/com/flowcrypt/email/ui/fragment/isolation/incontainer/UpdatePrivateKeyFragmentInIsolationTest.kt @@ -5,13 +5,13 @@ package com.flowcrypt.email.ui.fragment.isolation.incontainer -import androidx.test.espresso.Espresso -import androidx.test.espresso.Espresso.* +import androidx.test.espresso.Espresso.onView import androidx.test.espresso.action.ViewActions -import androidx.test.espresso.assertion.ViewAssertions -import androidx.test.espresso.assertion.ViewAssertions.* -import androidx.test.espresso.matcher.ViewMatchers -import androidx.test.espresso.matcher.ViewMatchers.* +import androidx.test.espresso.assertion.ViewAssertions.matches +import androidx.test.espresso.matcher.ViewMatchers.isEnabled +import androidx.test.espresso.matcher.ViewMatchers.isNotEnabled +import androidx.test.espresso.matcher.ViewMatchers.withId +import androidx.test.espresso.matcher.ViewMatchers.withText import androidx.test.ext.junit.runners.AndroidJUnit4 import androidx.test.filters.MediumTest import com.flowcrypt.email.R @@ -22,21 +22,15 @@ import com.flowcrypt.email.rules.ClearAppSettingsRule import com.flowcrypt.email.rules.GrantPermissionRuleChooser import com.flowcrypt.email.rules.RetryRule import com.flowcrypt.email.rules.ScreenshotTestRule -import com.flowcrypt.email.security.pgp.PgpKey import com.flowcrypt.email.ui.activity.fragment.UpdatePrivateKeyFragment import com.flowcrypt.email.ui.activity.fragment.UpdatePrivateKeyFragmentArgs import com.flowcrypt.email.ui.base.AddAccountToDatabaseRuleInterface -import org.hamcrest.CoreMatchers -import org.hamcrest.CoreMatchers.* -import org.hamcrest.Matchers -import org.hamcrest.Matchers.emptyString import org.junit.Before import org.junit.Rule import org.junit.Test import org.junit.rules.RuleChain import org.junit.rules.TestRule import org.junit.runner.RunWith -import org.pgpainless.key.info.KeyRingInfo /** * @author Denys Bondarenko @@ -72,7 +66,7 @@ class UpdatePrivateKeyFragmentInIsolationTest : BaseTest(), AddAccountToDatabase Thread.sleep(1000) onView(withId(R.id.editTextNewPrivateKey)) - .check(matches(withText(`is`(emptyString())))) + .check(matches(withText(""))) onView(withId(R.id.buttonCheck)) .check(matches(isNotEnabled())) From 128a54d86583e9705994c7fd871b9adc24e38e94 Mon Sep 17 00:00:00 2001 From: Denys Bondarenko Date: Tue, 20 Jan 2026 20:51:49 +0200 Subject: [PATCH 4/8] Fixed compilation issues --- .../java/com/flowcrypt/email/ui/ComposeScreenFlowTest.kt | 5 +++-- .../ui/StandardReplyWithServiceInfoAndOneFileFlowTest.kt | 8 +++++--- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/FlowCrypt/src/androidTest/java/com/flowcrypt/email/ui/ComposeScreenFlowTest.kt b/FlowCrypt/src/androidTest/java/com/flowcrypt/email/ui/ComposeScreenFlowTest.kt index b9d983e30..b465dfb00 100644 --- a/FlowCrypt/src/androidTest/java/com/flowcrypt/email/ui/ComposeScreenFlowTest.kt +++ b/FlowCrypt/src/androidTest/java/com/flowcrypt/email/ui/ComposeScreenFlowTest.kt @@ -258,7 +258,7 @@ class ComposeScreenFlowTest : BaseComposeScreenTest() { .check(matches(isDisplayed())) onView(withId(R.id.editTextFrom)) .perform(scrollTo()) - .check(matches(withText(not(`is`(emptyString()))))) + .check(matches(withText(not("")))) onView(withId(R.id.recyclerViewChipsTo)) .check(matches(isDisplayed())) .check(matches(withRecyclerViewItemCount(1))) @@ -920,7 +920,8 @@ class ComposeScreenFlowTest : BaseComposeScreenTest() { @get:ClassRule @JvmStatic - val mockWebServerRule = FlowCryptMockWebServerRule(TestConstants.MOCK_WEB_SERVER_PORT, + val mockWebServerRule = FlowCryptMockWebServerRule( + TestConstants.MOCK_WEB_SERVER_PORT, object : Dispatcher() { override fun dispatch(request: RecordedRequest): MockResponse { if (request.path?.startsWith("/attester/pub", ignoreCase = true) == true) { diff --git a/FlowCrypt/src/androidTest/java/com/flowcrypt/email/ui/StandardReplyWithServiceInfoAndOneFileFlowTest.kt b/FlowCrypt/src/androidTest/java/com/flowcrypt/email/ui/StandardReplyWithServiceInfoAndOneFileFlowTest.kt index 6ba082c26..13edcdfb0 100644 --- a/FlowCrypt/src/androidTest/java/com/flowcrypt/email/ui/StandardReplyWithServiceInfoAndOneFileFlowTest.kt +++ b/FlowCrypt/src/androidTest/java/com/flowcrypt/email/ui/StandardReplyWithServiceInfoAndOneFileFlowTest.kt @@ -42,7 +42,6 @@ import com.flowcrypt.email.ui.activity.CreateMessageActivity import com.flowcrypt.email.util.AccountDaoManager import com.flowcrypt.email.util.TestGeneralUtil import org.hamcrest.Matchers.allOf -import org.hamcrest.Matchers.`is` import org.hamcrest.Matchers.not import org.junit.Rule import org.junit.Test @@ -161,8 +160,11 @@ class StandardReplyWithServiceInfoAndOneFileFlowTest : BaseTest() { matches( allOf( isDisplayed(), - if (TextUtils.isEmpty(serviceInfo.systemMsg)) withText(`is`(emptyString())) - else withText(serviceInfo.systemMsg), + if (TextUtils.isEmpty(serviceInfo.systemMsg)) { + withText("") + } else { + withText(serviceInfo.systemMsg) + }, if (serviceInfo.isMsgEditable) isFocusable() else not(isFocusable()) ) ) From eecb25f00c2f62cab2ee1a0efd41db35aee55a2d Mon Sep 17 00:00:00 2001 From: Denys Bondarenko Date: Thu, 29 Jan 2026 21:04:34 +0200 Subject: [PATCH 5/8] wip --- .../ui/DraftsGmailAPITestCorrectCreatingAndUpdatingFlowTest.kt | 2 +- .../email/ui/DraftsGmailAPITestCorrectDeletingFlowTest.kt | 2 +- .../email/ui/DraftsGmailAPITestCorrectSendingFlowTest.kt | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/FlowCrypt/src/androidTest/java/com/flowcrypt/email/ui/DraftsGmailAPITestCorrectCreatingAndUpdatingFlowTest.kt b/FlowCrypt/src/androidTest/java/com/flowcrypt/email/ui/DraftsGmailAPITestCorrectCreatingAndUpdatingFlowTest.kt index c2c7c218c..550b12930 100644 --- a/FlowCrypt/src/androidTest/java/com/flowcrypt/email/ui/DraftsGmailAPITestCorrectCreatingAndUpdatingFlowTest.kt +++ b/FlowCrypt/src/androidTest/java/com/flowcrypt/email/ui/DraftsGmailAPITestCorrectCreatingAndUpdatingFlowTest.kt @@ -39,7 +39,7 @@ import okhttp3.mockwebserver.Dispatcher import okhttp3.mockwebserver.MockResponse import okhttp3.mockwebserver.RecordedRequest import org.hamcrest.Matchers -import org.hamcrest.core.AllOf.allOf +import org.hamcrest.Matchers.allOf import org.junit.Assert.assertEquals import org.junit.Rule import org.junit.Test diff --git a/FlowCrypt/src/androidTest/java/com/flowcrypt/email/ui/DraftsGmailAPITestCorrectDeletingFlowTest.kt b/FlowCrypt/src/androidTest/java/com/flowcrypt/email/ui/DraftsGmailAPITestCorrectDeletingFlowTest.kt index 2d95655d6..eb5a534c3 100644 --- a/FlowCrypt/src/androidTest/java/com/flowcrypt/email/ui/DraftsGmailAPITestCorrectDeletingFlowTest.kt +++ b/FlowCrypt/src/androidTest/java/com/flowcrypt/email/ui/DraftsGmailAPITestCorrectDeletingFlowTest.kt @@ -35,7 +35,7 @@ import kotlinx.coroutines.runBlocking import okhttp3.mockwebserver.Dispatcher import okhttp3.mockwebserver.MockResponse import okhttp3.mockwebserver.RecordedRequest -import org.hamcrest.core.AllOf.allOf +import org.hamcrest.Matchers.allOf import org.junit.Assert.assertEquals import org.junit.Before import org.junit.Rule diff --git a/FlowCrypt/src/androidTest/java/com/flowcrypt/email/ui/DraftsGmailAPITestCorrectSendingFlowTest.kt b/FlowCrypt/src/androidTest/java/com/flowcrypt/email/ui/DraftsGmailAPITestCorrectSendingFlowTest.kt index 6ae85ad19..1f06aca03 100644 --- a/FlowCrypt/src/androidTest/java/com/flowcrypt/email/ui/DraftsGmailAPITestCorrectSendingFlowTest.kt +++ b/FlowCrypt/src/androidTest/java/com/flowcrypt/email/ui/DraftsGmailAPITestCorrectSendingFlowTest.kt @@ -41,7 +41,7 @@ import kotlinx.coroutines.runBlocking import okhttp3.mockwebserver.Dispatcher import okhttp3.mockwebserver.MockResponse import okhttp3.mockwebserver.RecordedRequest -import org.hamcrest.core.AllOf.allOf +import org.hamcrest.Matchers.allOf import org.junit.Assert.assertEquals import org.junit.Rule import org.junit.Test From 2a3c58560281c80978c2312b10f2c1c64ea714a3 Mon Sep 17 00:00:00 2001 From: Denys Bondarenko Date: Thu, 29 Jan 2026 22:44:54 +0200 Subject: [PATCH 6/8] wip --- gradle/wrapper/gradle-wrapper.properties | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 768e4fe16..8749a79c6 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -2,9 +2,8 @@ # © 2016-present FlowCrypt a.s. Limitations apply. Contact human@flowcrypt.com # Contributors: denbond7 # -#Sat Aug 16 14:50:01 EEST 2025 distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-9.3.0-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-9.3.1-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists From d42e0d5942b73dcf6da54c0830f6dc53cd07ca13 Mon Sep 17 00:00:00 2001 From: Denys Bondarenko Date: Sat, 31 Jan 2026 08:31:08 +0200 Subject: [PATCH 7/8] wip --- .../androidTest/java/com/flowcrypt/email/SendMsgTest.kt | 4 ++-- .../com/flowcrypt/email/matchers/ToolBarTitleMatcher.kt | 4 ++-- .../com/flowcrypt/email/ui/AddOtherAccountFlowTest.kt | 4 ++-- ...ailableMultipleKeysWithPassphraseInDatabaseFlowTest.kt | 8 +------- .../ui/ImportRecipientsFromSourceFragmentFlowTest.kt | 2 +- ...esAfterSetupDuringRefreshingClientConfigurationTest.kt | 2 +- .../flowcrypt/email/ui/base/AddOtherAccountBaseTest.kt | 8 ++++---- .../com/flowcrypt/email/ui/base/BaseComposeGmailFlow.kt | 4 ++-- .../email/ui/base/BaseComposeScreenNoKeyAvailableTest.kt | 4 ++-- .../incontainer/BackupKeysFragmentInIsolationTest.kt | 4 ++-- .../BackupKeysFragmentTwoKeysSamePassphraseTest.kt | 4 ++-- .../incontainer/MessagesListFragmentInIsolationTest.kt | 2 +- .../SearchBackupsInEmailFragmentInIsolationTest.kt | 3 +-- .../ComposeScreenForwardWithGmailApiSignatureFlowTest.kt | 2 +- .../email/security/pgp/ProcessMimeMessageTest.kt | 2 +- 15 files changed, 25 insertions(+), 32 deletions(-) diff --git a/FlowCrypt/src/androidTest/java/com/flowcrypt/email/SendMsgTest.kt b/FlowCrypt/src/androidTest/java/com/flowcrypt/email/SendMsgTest.kt index 44bea1889..03da70853 100644 --- a/FlowCrypt/src/androidTest/java/com/flowcrypt/email/SendMsgTest.kt +++ b/FlowCrypt/src/androidTest/java/com/flowcrypt/email/SendMsgTest.kt @@ -35,7 +35,6 @@ import com.flowcrypt.email.security.pgp.PgpDecryptAndOrVerify import com.flowcrypt.email.security.pgp.PgpKey import com.flowcrypt.email.util.AccountDaoManager import com.flowcrypt.email.util.PrivateKeysManager -import org.eclipse.angus.mail.imap.IMAPFolder import jakarta.mail.Flags import jakarta.mail.Folder import jakarta.mail.Message @@ -52,8 +51,9 @@ import kotlinx.coroutines.runBlocking import kotlinx.coroutines.withContext import org.bouncycastle.openpgp.PGPSecretKeyRing import org.bouncycastle.openpgp.PGPSecretKeyRingCollection -import org.hamcrest.CoreMatchers.`is` +import org.eclipse.angus.mail.imap.IMAPFolder import org.hamcrest.MatcherAssert.assertThat +import org.hamcrest.Matchers.`is` import org.junit.Assert.assertArrayEquals import org.junit.Assert.assertEquals import org.junit.Assert.assertFalse diff --git a/FlowCrypt/src/androidTest/java/com/flowcrypt/email/matchers/ToolBarTitleMatcher.kt b/FlowCrypt/src/androidTest/java/com/flowcrypt/email/matchers/ToolBarTitleMatcher.kt index fa70c4d88..a2e4c7bf3 100644 --- a/FlowCrypt/src/androidTest/java/com/flowcrypt/email/matchers/ToolBarTitleMatcher.kt +++ b/FlowCrypt/src/androidTest/java/com/flowcrypt/email/matchers/ToolBarTitleMatcher.kt @@ -1,6 +1,6 @@ /* * © 2016-present FlowCrypt a.s. Limitations apply. Contact human@flowcrypt.com - * Contributors: DenBond7 + * Contributors: denbond7 */ package com.flowcrypt.email.matchers @@ -9,9 +9,9 @@ import android.view.View import androidx.appcompat.widget.Toolbar import androidx.test.espresso.matcher.BoundedMatcher import com.google.android.gms.common.internal.Preconditions.checkNotNull -import org.hamcrest.CoreMatchers.`is` import org.hamcrest.Description import org.hamcrest.Matcher +import org.hamcrest.Matchers.`is` /** * @author Denys Bondarenko diff --git a/FlowCrypt/src/androidTest/java/com/flowcrypt/email/ui/AddOtherAccountFlowTest.kt b/FlowCrypt/src/androidTest/java/com/flowcrypt/email/ui/AddOtherAccountFlowTest.kt index 9172ba221..9fd6dc17e 100644 --- a/FlowCrypt/src/androidTest/java/com/flowcrypt/email/ui/AddOtherAccountFlowTest.kt +++ b/FlowCrypt/src/androidTest/java/com/flowcrypt/email/ui/AddOtherAccountFlowTest.kt @@ -29,8 +29,8 @@ import com.flowcrypt.email.ui.activity.MainActivity import com.flowcrypt.email.ui.base.AddOtherAccountBaseTest import com.flowcrypt.email.util.AuthCredentialsManager import com.flowcrypt.email.util.TestGeneralUtil -import org.hamcrest.CoreMatchers.anyOf -import org.hamcrest.CoreMatchers.startsWith +import org.hamcrest.Matchers.anyOf +import org.hamcrest.Matchers.startsWith import org.junit.Rule import org.junit.Test import org.junit.rules.RuleChain diff --git a/FlowCrypt/src/androidTest/java/com/flowcrypt/email/ui/ComposeScreenNoKeyAvailableMultipleKeysWithPassphraseInDatabaseFlowTest.kt b/FlowCrypt/src/androidTest/java/com/flowcrypt/email/ui/ComposeScreenNoKeyAvailableMultipleKeysWithPassphraseInDatabaseFlowTest.kt index e0b64ef52..0ea17c622 100644 --- a/FlowCrypt/src/androidTest/java/com/flowcrypt/email/ui/ComposeScreenNoKeyAvailableMultipleKeysWithPassphraseInDatabaseFlowTest.kt +++ b/FlowCrypt/src/androidTest/java/com/flowcrypt/email/ui/ComposeScreenNoKeyAvailableMultipleKeysWithPassphraseInDatabaseFlowTest.kt @@ -1,6 +1,6 @@ /* * © 2016-present FlowCrypt a.s. Limitations apply. Contact human@flowcrypt.com - * Contributors: DenBond7 + * Contributors: denbond7 */ package com.flowcrypt.email.ui @@ -8,16 +8,12 @@ package com.flowcrypt.email.ui import androidx.test.espresso.Espresso.onView import androidx.test.espresso.action.ViewActions.click import androidx.test.espresso.assertion.ViewAssertions.matches -import androidx.test.espresso.matcher.ViewMatchers.hasTextColor import androidx.test.espresso.matcher.ViewMatchers.isDisplayed import androidx.test.espresso.matcher.ViewMatchers.withId -import androidx.test.espresso.matcher.ViewMatchers.withText import androidx.test.ext.junit.runners.AndroidJUnit4 import androidx.test.filters.FlakyTest import androidx.test.filters.MediumTest import com.flowcrypt.email.R -import com.flowcrypt.email.TestConstants -import com.flowcrypt.email.extensions.kotlin.asInternetAddress import com.flowcrypt.email.junit.annotations.FlowCryptTestSettings import com.flowcrypt.email.junit.annotations.NotReadyForCI import com.flowcrypt.email.rules.AddPrivateKeyToDatabaseRule @@ -26,10 +22,8 @@ import com.flowcrypt.email.rules.GrantPermissionRuleChooser import com.flowcrypt.email.rules.RetryRule import com.flowcrypt.email.rules.ScreenshotTestRule import com.flowcrypt.email.ui.base.BaseComposeScreenNoKeyAvailableTest -import org.hamcrest.CoreMatchers.not import org.junit.Rule import org.junit.Test -import org.junit.Ignore import org.junit.rules.RuleChain import org.junit.rules.TestRule import org.junit.runner.RunWith diff --git a/FlowCrypt/src/androidTest/java/com/flowcrypt/email/ui/ImportRecipientsFromSourceFragmentFlowTest.kt b/FlowCrypt/src/androidTest/java/com/flowcrypt/email/ui/ImportRecipientsFromSourceFragmentFlowTest.kt index 0c19d0393..b2570de4f 100644 --- a/FlowCrypt/src/androidTest/java/com/flowcrypt/email/ui/ImportRecipientsFromSourceFragmentFlowTest.kt +++ b/FlowCrypt/src/androidTest/java/com/flowcrypt/email/ui/ImportRecipientsFromSourceFragmentFlowTest.kt @@ -33,7 +33,7 @@ import com.flowcrypt.email.util.TestGeneralUtil import okhttp3.mockwebserver.Dispatcher import okhttp3.mockwebserver.MockResponse import okhttp3.mockwebserver.RecordedRequest -import org.hamcrest.CoreMatchers.containsString +import org.hamcrest.Matchers.containsString import org.junit.After import org.junit.Before import org.junit.Rule diff --git a/FlowCrypt/src/androidTest/java/com/flowcrypt/email/ui/UseFesAfterSetupDuringRefreshingClientConfigurationTest.kt b/FlowCrypt/src/androidTest/java/com/flowcrypt/email/ui/UseFesAfterSetupDuringRefreshingClientConfigurationTest.kt index f8e3a72d5..912f89706 100644 --- a/FlowCrypt/src/androidTest/java/com/flowcrypt/email/ui/UseFesAfterSetupDuringRefreshingClientConfigurationTest.kt +++ b/FlowCrypt/src/androidTest/java/com/flowcrypt/email/ui/UseFesAfterSetupDuringRefreshingClientConfigurationTest.kt @@ -29,8 +29,8 @@ import kotlinx.coroutines.runBlocking import okhttp3.mockwebserver.Dispatcher import okhttp3.mockwebserver.MockResponse import okhttp3.mockwebserver.RecordedRequest -import org.hamcrest.CoreMatchers.`is` import org.hamcrest.MatcherAssert.assertThat +import org.hamcrest.Matchers.`is` import org.junit.Assert.assertArrayEquals import org.junit.Assert.assertEquals import org.junit.Rule diff --git a/FlowCrypt/src/androidTest/java/com/flowcrypt/email/ui/base/AddOtherAccountBaseTest.kt b/FlowCrypt/src/androidTest/java/com/flowcrypt/email/ui/base/AddOtherAccountBaseTest.kt index 77a32794c..c1ffbd752 100644 --- a/FlowCrypt/src/androidTest/java/com/flowcrypt/email/ui/base/AddOtherAccountBaseTest.kt +++ b/FlowCrypt/src/androidTest/java/com/flowcrypt/email/ui/base/AddOtherAccountBaseTest.kt @@ -1,6 +1,6 @@ /* * © 2016-present FlowCrypt a.s. Limitations apply. Contact human@flowcrypt.com - * Contributors: DenBond7 + * Contributors: denbond7 */ package com.flowcrypt.email.ui.base @@ -20,9 +20,9 @@ import com.flowcrypt.email.api.email.model.AuthCredentials import com.flowcrypt.email.api.email.model.SecurityType import com.flowcrypt.email.base.BaseTest import com.flowcrypt.email.matchers.CustomMatchers.Companion.withSecurityTypeOption -import org.hamcrest.CoreMatchers.`is` -import org.hamcrest.CoreMatchers.allOf -import org.hamcrest.CoreMatchers.instanceOf +import org.hamcrest.Matchers.allOf +import org.hamcrest.Matchers.instanceOf +import org.hamcrest.Matchers.`is` /** * @author Denys Bondarenko diff --git a/FlowCrypt/src/androidTest/java/com/flowcrypt/email/ui/base/BaseComposeGmailFlow.kt b/FlowCrypt/src/androidTest/java/com/flowcrypt/email/ui/base/BaseComposeGmailFlow.kt index 1be0c1084..656e7e2aa 100644 --- a/FlowCrypt/src/androidTest/java/com/flowcrypt/email/ui/base/BaseComposeGmailFlow.kt +++ b/FlowCrypt/src/androidTest/java/com/flowcrypt/email/ui/base/BaseComposeGmailFlow.kt @@ -47,8 +47,8 @@ import okhttp3.mockwebserver.MockResponse import okhttp3.mockwebserver.RecordedRequest import org.bouncycastle.openpgp.PGPSecretKeyRing import org.bouncycastle.openpgp.PGPSecretKeyRingCollection -import org.hamcrest.CoreMatchers.allOf -import org.hamcrest.CoreMatchers.not +import org.hamcrest.Matchers.allOf +import org.hamcrest.Matchers.not import org.junit.Assert.assertArrayEquals import org.junit.Assert.assertEquals import org.junit.Assert.assertFalse diff --git a/FlowCrypt/src/androidTest/java/com/flowcrypt/email/ui/base/BaseComposeScreenNoKeyAvailableTest.kt b/FlowCrypt/src/androidTest/java/com/flowcrypt/email/ui/base/BaseComposeScreenNoKeyAvailableTest.kt index 13b01b963..5945f12b6 100644 --- a/FlowCrypt/src/androidTest/java/com/flowcrypt/email/ui/base/BaseComposeScreenNoKeyAvailableTest.kt +++ b/FlowCrypt/src/androidTest/java/com/flowcrypt/email/ui/base/BaseComposeScreenNoKeyAvailableTest.kt @@ -20,7 +20,7 @@ import com.flowcrypt.email.util.TestGeneralUtil import okhttp3.mockwebserver.Dispatcher import okhttp3.mockwebserver.MockResponse import okhttp3.mockwebserver.RecordedRequest -import org.hamcrest.CoreMatchers +import org.hamcrest.Matchers.not import org.junit.ClassRule import java.net.HttpURLConnection @@ -69,7 +69,7 @@ abstract class BaseComposeScreenNoKeyAvailableTest : BaseComposeScreenTest() { //check that editTextFrom doesn't have gray text color. It means a sender has a private key. onView(withId(R.id.editTextFrom)) .check(matches(isDisplayed())) - .check(matches(CoreMatchers.not(hasTextColor(R.color.gray)))) + .check(matches(not(hasTextColor(R.color.gray)))) } companion object { diff --git a/FlowCrypt/src/androidTest/java/com/flowcrypt/email/ui/fragment/isolation/incontainer/BackupKeysFragmentInIsolationTest.kt b/FlowCrypt/src/androidTest/java/com/flowcrypt/email/ui/fragment/isolation/incontainer/BackupKeysFragmentInIsolationTest.kt index 9677e2ade..db11c8a41 100644 --- a/FlowCrypt/src/androidTest/java/com/flowcrypt/email/ui/fragment/isolation/incontainer/BackupKeysFragmentInIsolationTest.kt +++ b/FlowCrypt/src/androidTest/java/com/flowcrypt/email/ui/fragment/isolation/incontainer/BackupKeysFragmentInIsolationTest.kt @@ -1,6 +1,6 @@ /* * © 2016-present FlowCrypt a.s. Limitations apply. Contact human@flowcrypt.com - * Contributors: DenBond7 + * Contributors: denbond7 */ package com.flowcrypt.email.ui.fragment.isolation.incontainer @@ -23,7 +23,7 @@ import com.flowcrypt.email.rules.ScreenshotTestRule import com.flowcrypt.email.ui.activity.fragment.BackupKeysFragment import com.flowcrypt.email.ui.base.BaseBackupKeysFragmentTest import com.flowcrypt.email.util.TestGeneralUtil -import org.hamcrest.CoreMatchers.not +import org.hamcrest.Matchers.not import org.junit.Before import org.junit.Rule import org.junit.Test diff --git a/FlowCrypt/src/androidTest/java/com/flowcrypt/email/ui/fragment/isolation/incontainer/BackupKeysFragmentTwoKeysSamePassphraseTest.kt b/FlowCrypt/src/androidTest/java/com/flowcrypt/email/ui/fragment/isolation/incontainer/BackupKeysFragmentTwoKeysSamePassphraseTest.kt index 9f7b94a00..0832c5b0d 100644 --- a/FlowCrypt/src/androidTest/java/com/flowcrypt/email/ui/fragment/isolation/incontainer/BackupKeysFragmentTwoKeysSamePassphraseTest.kt +++ b/FlowCrypt/src/androidTest/java/com/flowcrypt/email/ui/fragment/isolation/incontainer/BackupKeysFragmentTwoKeysSamePassphraseTest.kt @@ -1,6 +1,6 @@ /* * © 2016-present FlowCrypt a.s. Limitations apply. Contact human@flowcrypt.com - * Contributors: DenBond7 + * Contributors: denbond7 */ package com.flowcrypt.email.ui.fragment.isolation.incontainer @@ -24,7 +24,7 @@ import com.flowcrypt.email.rules.ScreenshotTestRule import com.flowcrypt.email.ui.activity.fragment.BackupKeysFragment import com.flowcrypt.email.ui.base.BaseBackupKeysFragmentTest import com.flowcrypt.email.util.TestGeneralUtil -import org.hamcrest.CoreMatchers.not +import org.hamcrest.Matchers.not import org.junit.Before import org.junit.Rule import org.junit.Test diff --git a/FlowCrypt/src/androidTest/java/com/flowcrypt/email/ui/fragment/isolation/incontainer/MessagesListFragmentInIsolationTest.kt b/FlowCrypt/src/androidTest/java/com/flowcrypt/email/ui/fragment/isolation/incontainer/MessagesListFragmentInIsolationTest.kt index 8936307fd..faebc6871 100644 --- a/FlowCrypt/src/androidTest/java/com/flowcrypt/email/ui/fragment/isolation/incontainer/MessagesListFragmentInIsolationTest.kt +++ b/FlowCrypt/src/androidTest/java/com/flowcrypt/email/ui/fragment/isolation/incontainer/MessagesListFragmentInIsolationTest.kt @@ -22,7 +22,7 @@ import com.flowcrypt.email.rules.RetryRule import com.flowcrypt.email.rules.ScreenshotTestRule import com.flowcrypt.email.ui.activity.fragment.MessagesListFragment import com.flowcrypt.email.ui.base.AddAccountToDatabaseRuleInterface -import org.hamcrest.CoreMatchers.not +import org.hamcrest.Matchers.not import org.junit.Before import org.junit.Rule import org.junit.Test diff --git a/FlowCrypt/src/androidTest/java/com/flowcrypt/email/ui/fragment/isolation/incontainer/SearchBackupsInEmailFragmentInIsolationTest.kt b/FlowCrypt/src/androidTest/java/com/flowcrypt/email/ui/fragment/isolation/incontainer/SearchBackupsInEmailFragmentInIsolationTest.kt index 2e8d87b9d..1d9be185a 100644 --- a/FlowCrypt/src/androidTest/java/com/flowcrypt/email/ui/fragment/isolation/incontainer/SearchBackupsInEmailFragmentInIsolationTest.kt +++ b/FlowCrypt/src/androidTest/java/com/flowcrypt/email/ui/fragment/isolation/incontainer/SearchBackupsInEmailFragmentInIsolationTest.kt @@ -22,8 +22,7 @@ import com.flowcrypt.email.rules.RetryRule import com.flowcrypt.email.rules.ScreenshotTestRule import com.flowcrypt.email.ui.activity.fragment.SearchBackupsInEmailFragment import com.flowcrypt.email.ui.base.AddAccountToDatabaseRuleInterface -import org.hamcrest.CoreMatchers.startsWith -import org.hamcrest.Matchers +import org.hamcrest.Matchers.startsWith import org.junit.Before import org.junit.Rule import org.junit.Test diff --git a/FlowCrypt/src/androidTest/java/com/flowcrypt/email/ui/gmailapi/ComposeScreenForwardWithGmailApiSignatureFlowTest.kt b/FlowCrypt/src/androidTest/java/com/flowcrypt/email/ui/gmailapi/ComposeScreenForwardWithGmailApiSignatureFlowTest.kt index cf6a5fbb7..8dd6a17bc 100644 --- a/FlowCrypt/src/androidTest/java/com/flowcrypt/email/ui/gmailapi/ComposeScreenForwardWithGmailApiSignatureFlowTest.kt +++ b/FlowCrypt/src/androidTest/java/com/flowcrypt/email/ui/gmailapi/ComposeScreenForwardWithGmailApiSignatureFlowTest.kt @@ -31,7 +31,7 @@ import com.flowcrypt.email.ui.base.BaseComposeGmailApiSignatureFlowTest import okhttp3.mockwebserver.Dispatcher import okhttp3.mockwebserver.MockResponse import okhttp3.mockwebserver.RecordedRequest -import org.hamcrest.CoreMatchers.startsWith +import org.hamcrest.Matchers.startsWith import org.junit.Ignore import org.junit.Rule import org.junit.Test diff --git a/FlowCrypt/src/test/java/com/flowcrypt/email/security/pgp/ProcessMimeMessageTest.kt b/FlowCrypt/src/test/java/com/flowcrypt/email/security/pgp/ProcessMimeMessageTest.kt index bf81cd570..49f98089d 100644 --- a/FlowCrypt/src/test/java/com/flowcrypt/email/security/pgp/ProcessMimeMessageTest.kt +++ b/FlowCrypt/src/test/java/com/flowcrypt/email/security/pgp/ProcessMimeMessageTest.kt @@ -16,8 +16,8 @@ import jakarta.mail.internet.MimeMessage import kotlinx.coroutines.runBlocking import org.bouncycastle.openpgp.PGPPublicKeyRingCollection import org.bouncycastle.openpgp.PGPSecretKeyRingCollection -import org.hamcrest.CoreMatchers.instanceOf import org.hamcrest.MatcherAssert.assertThat +import org.hamcrest.Matchers.instanceOf import org.jsoup.Jsoup import org.jsoup.parser.Parser import org.junit.Assert.assertEquals From 2febc393fa43d8700273a1d6b6fc66fcb45a5d19 Mon Sep 17 00:00:00 2001 From: Denys Bondarenko Date: Sun, 1 Feb 2026 21:26:35 +0200 Subject: [PATCH 8/8] wip --- .../com/flowcrypt/email/security/pgp/ProcessMimeMessageTest.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/FlowCrypt/src/test/java/com/flowcrypt/email/security/pgp/ProcessMimeMessageTest.kt b/FlowCrypt/src/test/java/com/flowcrypt/email/security/pgp/ProcessMimeMessageTest.kt index 49f98089d..bf81cd570 100644 --- a/FlowCrypt/src/test/java/com/flowcrypt/email/security/pgp/ProcessMimeMessageTest.kt +++ b/FlowCrypt/src/test/java/com/flowcrypt/email/security/pgp/ProcessMimeMessageTest.kt @@ -16,8 +16,8 @@ import jakarta.mail.internet.MimeMessage import kotlinx.coroutines.runBlocking import org.bouncycastle.openpgp.PGPPublicKeyRingCollection import org.bouncycastle.openpgp.PGPSecretKeyRingCollection +import org.hamcrest.CoreMatchers.instanceOf import org.hamcrest.MatcherAssert.assertThat -import org.hamcrest.Matchers.instanceOf import org.jsoup.Jsoup import org.jsoup.parser.Parser import org.junit.Assert.assertEquals