From 0a3069a0d82de1fde29ef3f8ee5726babdd11a5a Mon Sep 17 00:00:00 2001 From: Simon Marquis Date: Sun, 18 Jun 2023 11:42:12 +0200 Subject: [PATCH] Remove forced junit resolution strategy By looking at the Gradle scan's dependency tab, junit 4.12 is already replaced by 4.13.2. There is no need to manually force this at the configuration level. --- app/build.gradle.kts | 7 ------- .../src/main/kotlin/AndroidLibraryConventionPlugin.kt | 6 ------ 2 files changed, 13 deletions(-) diff --git a/app/build.gradle.kts b/app/build.gradle.kts index 3783928f5..1d8383b00 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -121,10 +121,3 @@ dependencies { implementation(libs.androidx.profileinstaller) implementation(libs.coil.kt) } - -// androidx.test is forcing JUnit, 4.12. This forces it to use 4.13 -configurations.configureEach { - resolutionStrategy { - force(libs.junit4) - } -} diff --git a/build-logic/convention/src/main/kotlin/AndroidLibraryConventionPlugin.kt b/build-logic/convention/src/main/kotlin/AndroidLibraryConventionPlugin.kt index ca955d754..864034561 100644 --- a/build-logic/convention/src/main/kotlin/AndroidLibraryConventionPlugin.kt +++ b/build-logic/convention/src/main/kotlin/AndroidLibraryConventionPlugin.kt @@ -21,7 +21,6 @@ import com.google.samples.apps.nowinandroid.configureGradleManagedDevices import com.google.samples.apps.nowinandroid.configureKotlinAndroid import com.google.samples.apps.nowinandroid.configurePrintApksTask import com.google.samples.apps.nowinandroid.disableUnnecessaryAndroidTests -import com.google.samples.apps.nowinandroid.libs import org.gradle.api.Plugin import org.gradle.api.Project import org.gradle.kotlin.dsl.configure @@ -46,11 +45,6 @@ class AndroidLibraryConventionPlugin : Plugin { configurePrintApksTask(this) disableUnnecessaryAndroidTests(target) } - configurations.configureEach { - resolutionStrategy { - force(libs.findLibrary("junit4").get()) - } - } dependencies { add("androidTestImplementation", kotlin("test")) add("testImplementation", kotlin("test"))