Bug 1918289 - Switch AC & GV from junit4 to junit-vintage. r=android-reviewers,mcarare

Differential Revision: https://phabricator.services.mozilla.com/D221905
This commit is contained in:
Ryan VanderMeulen 2024-09-12 12:36:21 +00:00
Родитель 7e51fa5a65
Коммит c6721db906
26 изменённых файлов: 34 добавлений и 31 удалений

Просмотреть файл

@ -165,10 +165,7 @@ subprojects {
packagingOptions {
resources {
excludes += ['META-INF/atomicfu.kotlin_module', 'META-INF/AL2.0', 'META-INF/LGPL2.1']
// Required dependencies using byte-buddy; remove after this is
// fixed by: https://issuetracker.google.com/issues/170131605
excludes.add("META-INF/licenses/ASM")
excludes += ['META-INF/LICENSE.md', 'META-INF/LICENSE-notice.md']
pickFirsts += ['win32-x86-64/attach_hotspot_windows.dll', 'win32-x86/attach_hotspot_windows.dll']
}

Просмотреть файл

@ -44,7 +44,7 @@ android {
packagingOptions {
resources {
excludes += ['META-INF/proguard/androidx-annotations.pro']
excludes += ['META-INF/LICENSE.md', 'META-INF/LICENSE-notice.md']
}
}

Просмотреть файл

@ -68,7 +68,7 @@ dependencies {
testImplementation project(':support-test')
testImplementation project(':support-test-libstate')
testImplementation ComponentsDependencies.androidx_test_junit
testImplementation ComponentsDependencies.testing_junit
testImplementation ComponentsDependencies.junit_vintage
testImplementation ComponentsDependencies.testing_robolectric
testImplementation ComponentsDependencies.testing_coroutines

Просмотреть файл

@ -55,7 +55,7 @@ dependencies {
testImplementation ComponentsDependencies.testing_coroutines
testImplementation ComponentsDependencies.androidx_test_core
testImplementation ComponentsDependencies.androidx_test_junit
testImplementation ComponentsDependencies.testing_junit
testImplementation ComponentsDependencies.junit_vintage
testImplementation ComponentsDependencies.testing_robolectric
}

Просмотреть файл

@ -30,7 +30,7 @@ dependencies {
implementation project(':support-base')
testImplementation project(':support-test')
testImplementation ComponentsDependencies.testing_junit
testImplementation ComponentsDependencies.junit_vintage
}
apply from: '../../../android-lint.gradle'

Просмотреть файл

@ -33,7 +33,7 @@ dependencies {
implementation ComponentsDependencies.androidx_annotation
testImplementation project(':support-test')
testImplementation ComponentsDependencies.testing_junit
testImplementation ComponentsDependencies.junit_vintage
}
apply from: '../../../android-lint.gradle'

Просмотреть файл

@ -54,7 +54,7 @@ dependencies {
testImplementation ComponentsDependencies.androidx_test_core
testImplementation ComponentsDependencies.androidx_test_junit
testImplementation ComponentsDependencies.testing_junit
testImplementation ComponentsDependencies.junit_vintage
testImplementation ComponentsDependencies.testing_robolectric
testImplementation ComponentsDependencies.testing_coroutines
}

Просмотреть файл

@ -55,7 +55,7 @@ dependencies {
testImplementation project(':support-test')
testImplementation ComponentsDependencies.androidx_test_core
testImplementation ComponentsDependencies.testing_junit
testImplementation ComponentsDependencies.junit_vintage
testImplementation ComponentsDependencies.testing_robolectric
testImplementation ComponentsDependencies.kotlin_coroutines

Просмотреть файл

@ -53,7 +53,7 @@ dependencies {
testImplementation ComponentsDependencies.androidx_test_core
testImplementation ComponentsDependencies.androidx_test_junit
testImplementation ComponentsDependencies.kotlin_reflect
testImplementation ComponentsDependencies.testing_junit
testImplementation ComponentsDependencies.junit_vintage
testImplementation ComponentsDependencies.testing_robolectric
testImplementation ComponentsDependencies.testing_coroutines
}

Просмотреть файл

@ -65,7 +65,7 @@ dependencies {
testImplementation ComponentsDependencies.androidx_test_core
testImplementation ComponentsDependencies.androidx_test_junit
testImplementation ComponentsDependencies.testing_coroutines
testImplementation ComponentsDependencies.testing_junit
testImplementation ComponentsDependencies.junit_vintage
testImplementation ComponentsDependencies.testing_robolectric
testImplementation ComponentsDependencies.kotlin_coroutines
testImplementation ComponentsDependencies.testing_coroutines

Просмотреть файл

@ -56,7 +56,7 @@ dependencies {
testImplementation project(':support-test')
testImplementation ComponentsDependencies.androidx_test_core
testImplementation ComponentsDependencies.testing_junit
testImplementation ComponentsDependencies.junit_vintage
testImplementation ComponentsDependencies.testing_robolectric
testImplementation ComponentsDependencies.testing_coroutines

Просмотреть файл

@ -67,7 +67,7 @@ dependencies {
testImplementation ComponentsDependencies.androidx_test_core
testImplementation ComponentsDependencies.testing_coroutines
testImplementation ComponentsDependencies.testing_junit
testImplementation ComponentsDependencies.junit_vintage
testImplementation ComponentsDependencies.testing_robolectric
testImplementation ComponentsDependencies.kotlin_coroutines

Просмотреть файл

@ -62,7 +62,7 @@ dependencies {
testImplementation ComponentsDependencies.androidx_test_core
testImplementation ComponentsDependencies.androidx_test_junit
testImplementation ComponentsDependencies.testing_junit
testImplementation ComponentsDependencies.junit_vintage
testImplementation ComponentsDependencies.testing_coroutines
testImplementation ComponentsDependencies.testing_robolectric
testImplementation ComponentsDependencies.kotlin_coroutines

Просмотреть файл

@ -25,7 +25,7 @@ android {
}
dependencies {
testImplementation ComponentsDependencies.testing_junit
testImplementation ComponentsDependencies.junit_vintage
testImplementation ComponentsDependencies.testing_mockito
}

Просмотреть файл

@ -34,7 +34,7 @@ dependencies {
testImplementation project(':support-test')
testImplementation ComponentsDependencies.androidx_test_core
testImplementation ComponentsDependencies.testing_junit
testImplementation ComponentsDependencies.junit_vintage
testImplementation ComponentsDependencies.testing_robolectric
}

Просмотреть файл

@ -32,7 +32,7 @@ dependencies {
testImplementation ComponentsDependencies.androidx_test_core
testImplementation ComponentsDependencies.androidx_test_junit
testImplementation ComponentsDependencies.testing_junit
testImplementation ComponentsDependencies.junit_vintage
testImplementation ComponentsDependencies.testing_robolectric
testImplementation project(':support-test')
}

Просмотреть файл

@ -41,7 +41,7 @@ dependencies {
testImplementation ComponentsDependencies.androidx_test_core
testImplementation ComponentsDependencies.testing_junit
testImplementation ComponentsDependencies.junit_vintage
testImplementation ComponentsDependencies.testing_robolectric
testImplementation ComponentsDependencies.testing_mockwebserver
testImplementation ComponentsDependencies.androidx_work_testing

Просмотреть файл

@ -40,7 +40,7 @@ dependencies {
testImplementation ComponentsDependencies.mozilla_appservices_full_megazord_forUnitTests
testImplementation ComponentsDependencies.testing_junit
testImplementation ComponentsDependencies.junit_vintage
testImplementation ComponentsDependencies.androidx_test_junit
testImplementation ComponentsDependencies.testing_robolectric
}

Просмотреть файл

@ -8,7 +8,7 @@ apply plugin: 'kotlin'
dependencies {
implementation ComponentsDependencies.tools_detekt_api
testImplementation ComponentsDependencies.testing_junit
testImplementation ComponentsDependencies.junit_vintage
testImplementation ComponentsDependencies.tools_detekt_api
testImplementation ComponentsDependencies.tools_detekt_test
}

Просмотреть файл

@ -25,14 +25,19 @@ android {
lintConfig file("lint.xml")
}
namespace 'mozilla.components.tooling.fetch.tests'
packagingOptions {
resources {
excludes += ['META-INF/LICENSE.md', 'META-INF/LICENSE-notice.md']
}
}
namespace 'mozilla.components.tooling.fetch.tests'
}
dependencies {
implementation project(':concept-fetch')
implementation ComponentsDependencies.testing_mockwebserver
implementation ComponentsDependencies.testing_junit
implementation ComponentsDependencies.junit_vintage
implementation ComponentsDependencies.kotlin_coroutines
}

Просмотреть файл

@ -16,7 +16,7 @@ dependencies {
testImplementation ComponentsDependencies.tools_lint
testImplementation ComponentsDependencies.tools_linttests
testImplementation ComponentsDependencies.testing_junit
testImplementation ComponentsDependencies.junit_vintage
testImplementation ComponentsDependencies.testing_mockito
}

Просмотреть файл

@ -21,7 +21,6 @@ object Versions {
const val mozilla_glean = "61.0.0"
const val junit = "4.13.2"
const val robolectric = "4.13"
const val mockito = "5.13.0"
const val maven_ant_tasks = "2.1.3"
@ -108,6 +107,7 @@ object Versions {
const val androidx_test_orchestrator = "1.5.0"
const val androidx_test_runner = "1.6.1"
const val androidx_test_uiautomator = "2.3.0"
const val junit = "5.10.2"
}
}
@ -118,7 +118,8 @@ object ComponentsDependencies {
const val kotlin_reflect = "org.jetbrains.kotlin:kotlin-reflect:${Versions.kotlin}"
const val kotlin_json = "org.jetbrains.kotlinx:kotlinx-serialization-json:${Versions.serialization}"
const val testing_junit = "junit:junit:${Versions.junit}"
const val junit_vintage = "org.junit.vintage:junit-vintage-engine:${Versions.Testing.junit}"
const val testing_robolectric = "org.robolectric:robolectric:${Versions.robolectric}"
const val testing_mockito = "org.mockito:mockito-core:${Versions.mockito}"
const val testing_mockwebserver = "com.squareup.okhttp3:mockwebserver:${Versions.okhttp}"

Просмотреть файл

@ -39,7 +39,7 @@ dependencies {
implementation ComponentsDependencies.androidx_annotation
implementation ComponentsDependencies.androidx_appcompat
implementation ComponentsDependencies.androidx_constraintlayout
testImplementation ComponentsDependencies.testing_junit
testImplementation ComponentsDependencies.junit_vintage
// Replace this with implementation "org.mozilla.geckoview:geckoview-${geckoviewChannel}:${geckoviewVersion}"
implementation project(path: ':geckoview')
}

Просмотреть файл

@ -39,6 +39,6 @@ dependencies {
implementation ComponentsDependencies.androidx_annotation
implementation ComponentsDependencies.androidx_appcompat
implementation ComponentsDependencies.androidx_constraintlayout
testImplementation ComponentsDependencies.testing_junit
testImplementation ComponentsDependencies.junit_vintage
implementation project(path: ':geckoview')
}

Просмотреть файл

@ -20,7 +20,7 @@ dependencies {
compileOnly ComponentsDependencies.tools_lintapi
compileOnly ComponentsDependencies.tools_lintchecks
testImplementation ComponentsDependencies.testing_junit
testImplementation ComponentsDependencies.junit_vintage
testImplementation ComponentsDependencies.tools_lint
testImplementation ComponentsDependencies.tools_linttests
}

Просмотреть файл

@ -227,7 +227,7 @@ dependencies {
implementation project(":exoplayer2")
}
testImplementation ComponentsDependencies.testing_junit
testImplementation ComponentsDependencies.junit_vintage
testImplementation ComponentsDependencies.testing_robolectric
androidTestImplementation ComponentsDependencies.testing_coroutines