Change truth testing library to legacy and only allow usage in old modules

This commit is contained in:
Wolf Montwé 2023-03-14 12:19:39 +01:00
parent 6f428c1642
commit 00b7bf45d7
No known key found for this signature in database
GPG key ID: 6D45B21512ACBF72
14 changed files with 24 additions and 5 deletions

View file

@ -1,12 +1,15 @@
package com.fsck.k9.autodiscovery.providersxml
import androidx.test.core.app.ApplicationProvider
import assertk.assertThat
import assertk.assertions.isEqualTo
import assertk.assertions.isNotNull
import assertk.assertions.isNull
import com.fsck.k9.RobolectricTest
import com.fsck.k9.mail.AuthType
import com.fsck.k9.mail.ConnectionSecurity
import com.fsck.k9.oauth.OAuthConfiguration
import com.fsck.k9.oauth.OAuthConfigurationProvider
import com.google.common.truth.Truth.assertThat
import org.junit.Test
class ProvidersXmlDiscoveryTest : RobolectricTest() {

View file

@ -1,10 +1,12 @@
package com.fsck.k9.autodiscovery.thunderbird
import assertk.assertThat
import assertk.assertions.isEqualTo
import assertk.assertions.isNotNull
import com.fsck.k9.autodiscovery.api.DiscoveredServerSettings
import com.fsck.k9.autodiscovery.api.DiscoveryResults
import com.fsck.k9.mail.AuthType
import com.fsck.k9.mail.ConnectionSecurity
import com.google.common.truth.Truth.assertThat
import org.junit.Test
class ThunderbirdAutoconfigTest {

View file

@ -1,6 +1,7 @@
package com.fsck.k9.autodiscovery.thunderbird
import com.google.common.truth.Truth.assertThat
import assertk.assertThat
import assertk.assertions.containsExactly
import org.junit.Test
class ThunderbirdAutoconfigUrlProviderTest {

View file

@ -35,6 +35,7 @@ dependencies {
testImplementation(projects.app.storage)
testImplementation(projects.app.testing)
testImplementation(libs.bundles.shared.jvm.test.legacy)
testImplementation(libs.kotlin.test)
testImplementation(libs.kotlin.reflect)
testImplementation(libs.robolectric)

View file

@ -1,6 +1,7 @@
package app.k9mail.html.cleaner
import com.google.common.truth.Truth.assertThat
import assertk.assertThat
import assertk.assertions.isEqualTo
import org.jsoup.nodes.Document
import org.junit.Test

View file

@ -32,6 +32,8 @@ dependencies {
debugImplementation(libs.leakcanary.android)
}
testImplementation(libs.bundles.shared.jvm.test.legacy)
// Required for DependencyInjectionTest to be able to resolve OpenPgpApiManager
testImplementation(projects.plugins.openpgpApiLib.openpgpApi)

View file

@ -12,6 +12,7 @@ dependencies {
implementation(libs.commons.io)
implementation(libs.moshi)
testImplementation(libs.bundles.shared.jvm.test.legacy)
testImplementation(projects.mail.testing)
testImplementation(projects.app.testing)
testImplementation(libs.robolectric)

View file

@ -55,6 +55,7 @@ dependencies {
implementation(libs.glide)
annotationProcessor(libs.glide.compiler)
testImplementation(libs.bundles.shared.jvm.test.legacy)
testImplementation(projects.core.testing)
testImplementation(projects.mail.testing)
testImplementation(projects.app.storage)

View file

@ -11,6 +11,7 @@ dependencies {
implementation(libs.kotlinx.coroutines.core)
testImplementation(libs.bundles.shared.jvm.test.legacy)
testImplementation(projects.mail.testing)
testImplementation(projects.backend.testing)
testImplementation(libs.mime4j.dom)

View file

@ -145,10 +145,12 @@ shared-jvm-android = [
]
shared-jvm-test = [
"junit",
"truth",
"assertk",
"mockito-inline",
"mockito-kotlin",
"koin-test",
"koin-test-junit4",
]
shared-jvm-test-legacy = [
"truth",
]

View file

@ -21,6 +21,7 @@ dependencies {
// We're only using this for its DefaultHostnameVerifier
implementation(libs.apache.httpclient5)
testImplementation(libs.bundles.shared.jvm.test.legacy)
testImplementation(projects.mail.testing)
testImplementation(libs.icu4j.charset)
}

View file

@ -17,6 +17,7 @@ dependencies {
implementation(libs.commons.io)
implementation(libs.okio)
testImplementation(libs.bundles.shared.jvm.test.legacy)
testImplementation(projects.mail.testing)
testImplementation(libs.okio)
testImplementation(libs.mime4j.core)

View file

@ -12,6 +12,7 @@ if (testCoverageEnabled) {
dependencies {
api(projects.mail.common)
testImplementation(libs.bundles.shared.jvm.test.legacy)
testImplementation(projects.mail.testing)
testImplementation(libs.okio)
testImplementation(libs.jzlib)

View file

@ -15,6 +15,7 @@ dependencies {
implementation(libs.commons.io)
implementation(libs.okio)
testImplementation(libs.bundles.shared.jvm.test.legacy)
testImplementation(projects.mail.testing)
testImplementation(libs.okio)
testImplementation(libs.jzlib)