Merge "Upgrade to junit 4.13.2" into androidx-main
diff --git a/appcompat/appcompat/src/androidTest/java/androidx/appcompat/widget/AppCompatSpinnerTest.java b/appcompat/appcompat/src/androidTest/java/androidx/appcompat/widget/AppCompatSpinnerTest.java
index cde0d75..7fc0315 100644
--- a/appcompat/appcompat/src/androidTest/java/androidx/appcompat/widget/AppCompatSpinnerTest.java
+++ b/appcompat/appcompat/src/androidTest/java/androidx/appcompat/widget/AppCompatSpinnerTest.java
@@ -28,8 +28,8 @@
import static androidx.test.espresso.matcher.ViewMatchers.withText;
import static org.hamcrest.CoreMatchers.instanceOf;
+import static org.hamcrest.MatcherAssert.assertThat;
import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertThat;
import android.app.Instrumentation;
import android.content.res.Resources;
diff --git a/appsearch/appsearch-builtin-types/build.gradle b/appsearch/appsearch-builtin-types/build.gradle
index 5e7d9bd..47db839 100644
--- a/appsearch/appsearch-builtin-types/build.gradle
+++ b/appsearch/appsearch-builtin-types/build.gradle
@@ -35,7 +35,7 @@
androidTestImplementation(libs.testRules)
androidTestImplementation(libs.truth)
androidTestImplementation(libs.multidex)
- androidTestImplementation("junit:junit:4.13")
+ androidTestImplementation(libs.junit)
}
androidx {
diff --git a/appsearch/appsearch-local-storage/build.gradle b/appsearch/appsearch-local-storage/build.gradle
index 870fa0c..3e5ebd7 100644
--- a/appsearch/appsearch-local-storage/build.gradle
+++ b/appsearch/appsearch-local-storage/build.gradle
@@ -83,7 +83,7 @@
androidTestImplementation(libs.truth)
androidTestImplementation(libs.mockitoAndroid)
//TODO(b/149787478) upgrade and link to Dependencies.kt
- androidTestImplementation("junit:junit:4.13")
+ androidTestImplementation(libs.junit)
}
androidx {
diff --git a/appsearch/appsearch-platform-storage/build.gradle b/appsearch/appsearch-platform-storage/build.gradle
index 5016873..630273f 100644
--- a/appsearch/appsearch-platform-storage/build.gradle
+++ b/appsearch/appsearch-platform-storage/build.gradle
@@ -33,7 +33,7 @@
androidTestImplementation(libs.testCore)
androidTestImplementation(libs.testRules)
androidTestImplementation(libs.truth)
- androidTestImplementation("junit:junit:4.13")
+ androidTestImplementation(libs.junit)
}
androidx {
diff --git a/appsearch/appsearch-test-util/build.gradle b/appsearch/appsearch-test-util/build.gradle
index eaee014..d5fdfc8 100644
--- a/appsearch/appsearch-test-util/build.gradle
+++ b/appsearch/appsearch-test-util/build.gradle
@@ -34,7 +34,7 @@
androidTestImplementation(libs.testCore)
androidTestImplementation(libs.testRules)
androidTestImplementation(libs.truth)
- androidTestImplementation("junit:junit:4.13")
+ androidTestImplementation(libs.junit)
}
androidx {
diff --git a/appsearch/appsearch/build.gradle b/appsearch/appsearch/build.gradle
index 3f29de2..86a1f1e 100644
--- a/appsearch/appsearch/build.gradle
+++ b/appsearch/appsearch/build.gradle
@@ -44,7 +44,7 @@
androidTestImplementation(libs.testRules)
androidTestImplementation(libs.truth)
//TODO(b/149787478) upgrade and link to Dependencies.kt
- androidTestImplementation("junit:junit:4.13")
+ androidTestImplementation(libs.junit)
// This dependency is unused by the test implementation, but it's here to validate that
// icing's jarjar'ing of the Protobuf_lite doesn't conflict with external dependencies.
androidTestImplementation(libs.protobufLite)
diff --git a/arch/core/core-common/src/test/java/androidx/collection/FastSafeIterableMapTest.java b/arch/core/core-common/src/test/java/androidx/collection/FastSafeIterableMapTest.java
index 9b392e2..9ef9e12 100644
--- a/arch/core/core-common/src/test/java/androidx/collection/FastSafeIterableMapTest.java
+++ b/arch/core/core-common/src/test/java/androidx/collection/FastSafeIterableMapTest.java
@@ -18,7 +18,7 @@
import static org.hamcrest.CoreMatchers.is;
import static org.hamcrest.CoreMatchers.nullValue;
-import static org.junit.Assert.assertThat;
+import static org.hamcrest.MatcherAssert.assertThat;
import androidx.arch.core.internal.FastSafeIterableMap;
diff --git a/autofill/autofill/build.gradle b/autofill/autofill/build.gradle
index 6379a81..8094b3e 100644
--- a/autofill/autofill/build.gradle
+++ b/autofill/autofill/build.gradle
@@ -31,7 +31,7 @@
androidTestImplementation(libs.testRunner)
androidTestImplementation(libs.testRules)
androidTestImplementation(libs.truth)
- androidTestImplementation("junit:junit:4.12")
+ androidTestImplementation(libs.junit)
}
androidx {
diff --git a/camera/camera-camera2/build.gradle b/camera/camera-camera2/build.gradle
index 63b4d89..0211189 100644
--- a/camera/camera-camera2/build.gradle
+++ b/camera/camera-camera2/build.gradle
@@ -46,7 +46,7 @@
testImplementation("androidx.lifecycle:lifecycle-runtime-testing:2.3.1")
testImplementation(project(":camera:camera-testing"))
testImplementation("androidx.arch.core:core-testing:2.1.0")
- testImplementation("junit:junit:4.13") // Needed for Assert.assertThrows
+ testImplementation(libs.junit) // Needed for Assert.assertThrows
testImplementation("org.apache.maven:maven-ant-tasks:2.1.3")
androidTestImplementation(libs.multidex)
diff --git a/camera/camera-video/build.gradle b/camera/camera-video/build.gradle
index 0fe8c7c..a7a72c5 100644
--- a/camera/camera-video/build.gradle
+++ b/camera/camera-video/build.gradle
@@ -37,7 +37,7 @@
// TODO(leohuang): We need this for assertThrows. Point back to the AndroidX shared version if
// it is ever upgraded.
- testImplementation("junit:junit:4.13")
+ testImplementation(libs.junit)
testImplementation(libs.kotlinStdlib)
testImplementation(libs.testCore)
testImplementation(libs.testRunner)
diff --git a/camera/integration-tests/viewtestapp/src/androidTest/java/androidx/camera/integration/view/CameraControllerFragmentTest.kt b/camera/integration-tests/viewtestapp/src/androidTest/java/androidx/camera/integration/view/CameraControllerFragmentTest.kt
index 40e14e9..1716025 100644
--- a/camera/integration-tests/viewtestapp/src/androidTest/java/androidx/camera/integration/view/CameraControllerFragmentTest.kt
+++ b/camera/integration-tests/viewtestapp/src/androidTest/java/androidx/camera/integration/view/CameraControllerFragmentTest.kt
@@ -58,13 +58,13 @@
import com.google.common.truth.Truth.assertThat
import com.google.common.truth.Truth.assertWithMessage
import org.junit.After
+import org.junit.Assert
import org.junit.Assume
import org.junit.Assume.assumeTrue
import org.junit.Before
import org.junit.Ignore
import org.junit.Rule
import org.junit.Test
-import org.junit.rules.ExpectedException
import org.junit.rules.TestRule
import org.junit.runner.RunWith
import java.util.concurrent.Semaphore
@@ -93,9 +93,6 @@
}
@get:Rule
- val thrown: ExpectedException = ExpectedException.none()
-
- @get:Rule
val useCamera: TestRule = CameraUtil.grantCameraPermissionAndPreTest(testCameraRule)
@get:Rule
@@ -379,13 +376,13 @@
@Test
fun captureDisabled_cannotTakePicture() {
// Arrange.
- thrown.expectMessage("ImageCapture disabled")
-
- // Act.
onView(withId(R.id.capture_enabled)).perform(click())
- // Assert.
- fragment.assertCanTakePicture()
+ // Act and assert.
+ val exception = Assert.assertThrows(IllegalStateException::class.java) {
+ fragment.assertCanTakePicture()
+ }
+ assertThat(exception).hasMessageThat().isEqualTo("ImageCapture disabled.")
}
@Test
diff --git a/car/app/app-automotive/build.gradle b/car/app/app-automotive/build.gradle
index a8e2557..4043d07 100644
--- a/car/app/app-automotive/build.gradle
+++ b/car/app/app-automotive/build.gradle
@@ -39,7 +39,7 @@
annotationProcessor(libs.nullaway)
annotationProcessor(libs.autoValue)
- testImplementation("junit:junit:4.13")
+ testImplementation(libs.junit)
testImplementation(libs.testCore)
testImplementation(libs.testRunner)
testImplementation(libs.junit)
diff --git a/car/app/app-projected/build.gradle b/car/app/app-projected/build.gradle
index 854e820..9464391 100644
--- a/car/app/app-projected/build.gradle
+++ b/car/app/app-projected/build.gradle
@@ -28,7 +28,7 @@
implementation("androidx.annotation:annotation:1.2.0")
- testImplementation("junit:junit:4.13")
+ testImplementation(libs.junit)
testImplementation(libs.testCore)
testImplementation(libs.testRunner)
testImplementation(libs.junit)
diff --git a/car/app/app-testing/build.gradle b/car/app/app-testing/build.gradle
index 35a84e3..5fa3fff 100644
--- a/car/app/app-testing/build.gradle
+++ b/car/app/app-testing/build.gradle
@@ -33,7 +33,7 @@
// Build will complain without this manual declaration.
compileOnly libs.kotlinStdlib
- testImplementation("junit:junit:4.13")
+ testImplementation(libs.junit)
testImplementation(libs.testCore)
testImplementation(libs.testRunner)
testImplementation(libs.junit)
diff --git a/car/app/app/build.gradle b/car/app/app/build.gradle
index e545823..e9b57a8 100644
--- a/car/app/app/build.gradle
+++ b/car/app/app/build.gradle
@@ -65,7 +65,7 @@
// TODO(shiufai): We need this for assertThrows. Point back to the AndroidX shared version if
// it is ever upgraded.
- testImplementation("junit:junit:4.13")
+ testImplementation(libs.junit)
testImplementation(libs.testCore)
testImplementation(libs.testRunner)
testImplementation(libs.junit)
diff --git a/compose/animation/animation/src/androidAndroidTest/kotlin/androidx/compose/animation/AnimationModifierTest.kt b/compose/animation/animation/src/androidAndroidTest/kotlin/androidx/compose/animation/AnimationModifierTest.kt
index 6f5b9b1..fb17dc0 100644
--- a/compose/animation/animation/src/androidAndroidTest/kotlin/androidx/compose/animation/AnimationModifierTest.kt
+++ b/compose/animation/animation/src/androidAndroidTest/kotlin/androidx/compose/animation/AnimationModifierTest.kt
@@ -44,7 +44,7 @@
import org.hamcrest.CoreMatchers.`is`
import org.hamcrest.CoreMatchers.nullValue
import org.junit.After
-import org.junit.Assert.assertThat
+import org.hamcrest.MatcherAssert.assertThat
import org.junit.Before
import org.junit.Rule
import org.junit.Test
diff --git a/compose/ui/ui-graphics/src/test/java/androidx/compose/ui/graphics/ShadowTest.kt b/compose/ui/ui-graphics/src/test/java/androidx/compose/ui/graphics/ShadowTest.kt
index 0945a3e..62501b8 100644
--- a/compose/ui/ui-graphics/src/test/java/androidx/compose/ui/graphics/ShadowTest.kt
+++ b/compose/ui/ui-graphics/src/test/java/androidx/compose/ui/graphics/ShadowTest.kt
@@ -20,7 +20,7 @@
import androidx.compose.ui.geometry.lerp
import androidx.compose.ui.util.lerp
import org.hamcrest.CoreMatchers.equalTo
-import org.junit.Assert.assertThat
+import org.hamcrest.MatcherAssert.assertThat
import org.junit.Test
import org.junit.runner.RunWith
import org.junit.runners.JUnit4
diff --git a/compose/ui/ui/src/test/kotlin/androidx/compose/ui/autofill/AutofillNodeTest.kt b/compose/ui/ui/src/test/kotlin/androidx/compose/ui/autofill/AutofillNodeTest.kt
index c11fd2e..31faf0a 100644
--- a/compose/ui/ui/src/test/kotlin/androidx/compose/ui/autofill/AutofillNodeTest.kt
+++ b/compose/ui/ui/src/test/kotlin/androidx/compose/ui/autofill/AutofillNodeTest.kt
@@ -23,10 +23,9 @@
import androidx.compose.ui.geometry.Rect
import androidx.compose.ui.graphics.toComposeRect
import com.google.common.truth.Truth.assertThat
+import org.junit.Assert
import org.junit.Before
-import org.junit.Rule
import org.junit.Test
-import org.junit.rules.ExpectedException
import org.junit.runner.RunWith
import org.robolectric.Robolectric
import org.robolectric.RobolectricTestRunner
@@ -42,9 +41,6 @@
minSdk = 26
)
class AutofillNodeTest {
- @get:Rule
- val expectedException = ExpectedException.none()!!
-
private lateinit var androidAutofill: AndroidAutofill
private lateinit var autofillManager: ShadowAutofillManager
private lateinit var view: View
@@ -94,11 +90,15 @@
// Arrange - Before the composable is positioned, the boundingBox is null.
val autofillNode = AutofillNode(onFill = {})
- // Assert.
- expectedException.expectMessage("requestAutofill called before onChildPositioned()")
+ // Act and assert.
+ val exception = Assert.assertThrows(IllegalStateException::class.java) {
+ androidAutofill.requestAutofillForNode(autofillNode)
+ }
- // Act.
- androidAutofill.requestAutofillForNode(autofillNode)
+ // Assert some more.
+ assertThat(exception).hasMessageThat().isEqualTo(
+ "requestAutofill called before onChildPositioned()"
+ )
}
@Test
diff --git a/compose/ui/ui/src/test/kotlin/androidx/compose/ui/input/pointer/PointerInputTest.kt b/compose/ui/ui/src/test/kotlin/androidx/compose/ui/input/pointer/PointerInputTest.kt
index d2ca364..246b0d0 100644
--- a/compose/ui/ui/src/test/kotlin/androidx/compose/ui/input/pointer/PointerInputTest.kt
+++ b/compose/ui/ui/src/test/kotlin/androidx/compose/ui/input/pointer/PointerInputTest.kt
@@ -25,7 +25,7 @@
import com.google.common.truth.Truth.assertThat
import org.hamcrest.CoreMatchers.`is`
import org.hamcrest.core.IsEqual.equalTo
-import org.junit.Assert.assertThat
+import org.hamcrest.MatcherAssert.assertThat
import org.junit.Test
import org.junit.runner.RunWith
import org.junit.runners.JUnit4
diff --git a/compose/ui/ui/src/test/kotlin/androidx/compose/ui/node/LayoutNodeTest.kt b/compose/ui/ui/src/test/kotlin/androidx/compose/ui/node/LayoutNodeTest.kt
index 6c5a986..357777a 100644
--- a/compose/ui/ui/src/test/kotlin/androidx/compose/ui/node/LayoutNodeTest.kt
+++ b/compose/ui/ui/src/test/kotlin/androidx/compose/ui/node/LayoutNodeTest.kt
@@ -67,22 +67,18 @@
import androidx.compose.ui.unit.toOffset
import androidx.compose.ui.zIndex
import com.google.common.truth.Truth.assertThat
+import org.junit.Assert
import org.junit.Assert.assertEquals
import org.junit.Assert.assertFalse
import org.junit.Assert.assertNull
import org.junit.Assert.assertSame
import org.junit.Assert.assertTrue
-import org.junit.Rule
import org.junit.Test
-import org.junit.rules.ExpectedException
import org.junit.runner.RunWith
import org.junit.runners.JUnit4
@RunWith(JUnit4::class)
class LayoutNodeTest {
- @get:Rule
- val thrown = ExpectedException.none()!!
-
// Ensure that attach and detach work properly
@Test
fun layoutNodeAttachDetach() {
@@ -532,9 +528,9 @@
val node1 = LayoutNode()
node1.attach(owner)
- thrown.expect(IllegalArgumentException::class.java)
-
- node1.coordinates.localPositionOf(node0.coordinates, Offset(5f, 15f))
+ Assert.assertThrows(IllegalArgumentException::class.java) {
+ node1.coordinates.localPositionOf(node0.coordinates, Offset(5f, 15f))
+ }
}
@Test
@@ -610,16 +606,18 @@
@Test
fun testAddBeyondCurrent() {
val node = LayoutNode()
- thrown.expect(IndexOutOfBoundsException::class.java)
- node.insertAt(1, LayoutNode())
+ Assert.assertThrows(IndexOutOfBoundsException::class.java) {
+ node.insertAt(1, LayoutNode())
+ }
}
// LayoutNode shouldn't allow adding below 0
@Test
fun testAddBelowZero() {
val node = LayoutNode()
- thrown.expect(IndexOutOfBoundsException::class.java)
- node.insertAt(-1, LayoutNode())
+ Assert.assertThrows(IndexOutOfBoundsException::class.java) {
+ node.insertAt(-1, LayoutNode())
+ }
}
// LayoutNode should error when removing at index < 0
@@ -627,8 +625,9 @@
fun testRemoveNegativeIndex() {
val node = LayoutNode()
node.insertAt(0, LayoutNode())
- thrown.expect(IndexOutOfBoundsException::class.java)
- node.removeAt(-1, 1)
+ Assert.assertThrows(IndexOutOfBoundsException::class.java) {
+ node.removeAt(-1, 1)
+ }
}
// LayoutNode should error when removing at index > count
@@ -636,8 +635,9 @@
fun testRemoveBeyondIndex() {
val node = LayoutNode()
node.insertAt(0, LayoutNode())
- thrown.expect(IndexOutOfBoundsException::class.java)
- node.removeAt(1, 1)
+ Assert.assertThrows(IndexOutOfBoundsException::class.java) {
+ node.removeAt(1, 1)
+ }
}
// LayoutNode should error when removing at count < 0
@@ -645,8 +645,9 @@
fun testRemoveNegativeCount() {
val node = LayoutNode()
node.insertAt(0, LayoutNode())
- thrown.expect(IllegalArgumentException::class.java)
- node.removeAt(0, -1)
+ Assert.assertThrows(IllegalArgumentException::class.java) {
+ node.removeAt(0, -1)
+ }
}
// LayoutNode should error when removing at count > entry count
@@ -654,16 +655,18 @@
fun testRemoveWithIndexBeyondSize() {
val node = LayoutNode()
node.insertAt(0, LayoutNode())
- thrown.expect(IndexOutOfBoundsException::class.java)
- node.removeAt(0, 2)
+ Assert.assertThrows(IndexOutOfBoundsException::class.java) {
+ node.removeAt(0, 2)
+ }
}
// LayoutNode should error when there aren't enough items
@Test
fun testRemoveWithIndexEqualToSize() {
val node = LayoutNode()
- thrown.expect(IndexOutOfBoundsException::class.java)
- node.removeAt(0, 1)
+ Assert.assertThrows(IndexOutOfBoundsException::class.java) {
+ node.removeAt(0, 1)
+ }
}
// LayoutNode should allow removing two items
diff --git a/core/core-google-shortcuts/build.gradle b/core/core-google-shortcuts/build.gradle
index 1931126..629fbaa 100644
--- a/core/core-google-shortcuts/build.gradle
+++ b/core/core-google-shortcuts/build.gradle
@@ -48,7 +48,7 @@
androidTestImplementation(libs.dexmakerMockito, excludes.bytebuddy)
androidTestImplementation(libs.truth)
androidTestImplementation(libs.multidex)
- androidTestImplementation("junit:junit:4.13")
+ androidTestImplementation(libs.junit)
}
androidx {
diff --git a/core/core/build.gradle b/core/core/build.gradle
index 023c4aa..fdec63b 100644
--- a/core/core/build.gradle
+++ b/core/core/build.gradle
@@ -22,7 +22,7 @@
// We don't ship this as a public artifact, so it must remain a project-type dependency.
annotationProcessor(project(":versionedparcelable:versionedparcelable-compiler"))
- androidTestImplementation("junit:junit:4.13")
+ androidTestImplementation(libs.junit)
androidTestImplementation(libs.kotlinStdlib)
androidTestImplementation(libs.testExtJunit)
androidTestImplementation(libs.testCore)
@@ -48,7 +48,7 @@
})
androidTestImplementation(project(":internal-testutils-mockito"))
- testImplementation("junit:junit:4.13")
+ testImplementation(libs.junit)
testImplementation(libs.testCore)
testImplementation(libs.testRunner)
testImplementation(libs.truth)
diff --git a/core/core/src/androidTest/java/androidx/core/app/NotificationTester.kt b/core/core/src/androidTest/java/androidx/core/app/NotificationTester.kt
index 466e8b2..e88ded0 100644
--- a/core/core/src/androidTest/java/androidx/core/app/NotificationTester.kt
+++ b/core/core/src/androidTest/java/androidx/core/app/NotificationTester.kt
@@ -19,7 +19,6 @@
import android.os.Build
import android.os.Bundle
import org.junit.Assert.assertEquals
-import java.util.ArrayList
import java.util.TreeSet
internal object NotificationTester {
diff --git a/core/core/src/androidTest/java/androidx/core/view/DisplayCutoutCompatTest.java b/core/core/src/androidTest/java/androidx/core/view/DisplayCutoutCompatTest.java
index 28e68ee..3bc2fe3 100644
--- a/core/core/src/androidTest/java/androidx/core/view/DisplayCutoutCompatTest.java
+++ b/core/core/src/androidTest/java/androidx/core/view/DisplayCutoutCompatTest.java
@@ -18,11 +18,11 @@
import static android.os.Build.VERSION.SDK_INT;
+import static org.hamcrest.MatcherAssert.assertThat;
import static org.hamcrest.Matchers.empty;
import static org.hamcrest.Matchers.hasItem;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotEquals;
-import static org.junit.Assert.assertThat;
import android.graphics.Rect;
diff --git a/core/core/src/androidTest/java/androidx/core/view/NestedScrollingHelperIntegrationTest.java b/core/core/src/androidTest/java/androidx/core/view/NestedScrollingHelperIntegrationTest.java
index bced4da..ba0f2ba 100644
--- a/core/core/src/androidTest/java/androidx/core/view/NestedScrollingHelperIntegrationTest.java
+++ b/core/core/src/androidTest/java/androidx/core/view/NestedScrollingHelperIntegrationTest.java
@@ -16,7 +16,7 @@
package androidx.core.view;
import static org.hamcrest.CoreMatchers.equalTo;
-import static org.junit.Assert.assertThat;
+import static org.hamcrest.MatcherAssert.assertThat;
import android.content.Context;
import android.view.View;
diff --git a/core/core/src/androidTest/java/androidx/core/view/ViewCompatTest.java b/core/core/src/androidTest/java/androidx/core/view/ViewCompatTest.java
index 4230bdc..4f2c3a3 100644
--- a/core/core/src/androidTest/java/androidx/core/view/ViewCompatTest.java
+++ b/core/core/src/androidTest/java/androidx/core/view/ViewCompatTest.java
@@ -19,12 +19,12 @@
import static androidx.core.view.accessibility.AccessibilityNodeInfoCompat.AccessibilityActionCompat;
import static org.hamcrest.CoreMatchers.equalTo;
+import static org.hamcrest.MatcherAssert.assertThat;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotEquals;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertNull;
import static org.junit.Assert.assertSame;
-import static org.junit.Assert.assertThat;
import static org.junit.Assert.assertTrue;
import static org.mockito.ArgumentMatchers.any;
import static org.mockito.ArgumentMatchers.anyInt;
diff --git a/core/core/src/androidTest/java/androidx/core/view/accessibility/AccessibilityNodeInfoCompatTest.java b/core/core/src/androidTest/java/androidx/core/view/accessibility/AccessibilityNodeInfoCompatTest.java
index fe129ba..74e7079 100644
--- a/core/core/src/androidTest/java/androidx/core/view/accessibility/AccessibilityNodeInfoCompatTest.java
+++ b/core/core/src/androidTest/java/androidx/core/view/accessibility/AccessibilityNodeInfoCompatTest.java
@@ -18,8 +18,8 @@
import static org.hamcrest.CoreMatchers.is;
import static org.hamcrest.CoreMatchers.nullValue;
+import static org.hamcrest.MatcherAssert.assertThat;
import static org.hamcrest.core.IsEqual.equalTo;
-import static org.junit.Assert.assertThat;
import android.graphics.Region;
import android.os.Build;
diff --git a/core/core/src/androidTest/java/androidx/core/widget/NestedScrollViewNestedScrollingFlingVelocityTest.kt b/core/core/src/androidTest/java/androidx/core/widget/NestedScrollViewNestedScrollingFlingVelocityTest.kt
index ffdde65..4eed461 100644
--- a/core/core/src/androidTest/java/androidx/core/widget/NestedScrollViewNestedScrollingFlingVelocityTest.kt
+++ b/core/core/src/androidTest/java/androidx/core/widget/NestedScrollViewNestedScrollingFlingVelocityTest.kt
@@ -32,7 +32,6 @@
import org.junit.Test
import org.junit.runner.RunWith
import org.junit.runners.Parameterized
-import java.util.ArrayList
import java.util.Arrays
/**
diff --git a/core/core/src/androidTest/java/androidx/core/widget/TestContentView.java b/core/core/src/androidTest/java/androidx/core/widget/TestContentView.java
index 510041a..12ce05c 100644
--- a/core/core/src/androidTest/java/androidx/core/widget/TestContentView.java
+++ b/core/core/src/androidTest/java/androidx/core/widget/TestContentView.java
@@ -17,7 +17,7 @@
package androidx.core.widget;
import static org.hamcrest.CoreMatchers.equalTo;
-import static org.junit.Assert.assertThat;
+import static org.hamcrest.MatcherAssert.assertThat;
import android.content.Context;
import android.util.AttributeSet;
diff --git a/documentfile/documentfile/src/androidTest/java/androidx/documentfile/provider/DocumentFileTest.java b/documentfile/documentfile/src/androidTest/java/androidx/documentfile/provider/DocumentFileTest.java
index 98d4edc..ee2c0e61 100644
--- a/documentfile/documentfile/src/androidTest/java/androidx/documentfile/provider/DocumentFileTest.java
+++ b/documentfile/documentfile/src/androidTest/java/androidx/documentfile/provider/DocumentFileTest.java
@@ -16,8 +16,8 @@
package androidx.documentfile.provider;
+import static org.hamcrest.MatcherAssert.assertThat;
import static org.hamcrest.core.IsEqual.equalTo;
-import static org.junit.Assert.assertThat;
import android.content.Context;
import android.net.Uri;
diff --git a/emoji/emoji/src/androidTest/java/androidx/emoji/text/AllEmojisTest.java b/emoji/emoji/src/androidTest/java/androidx/emoji/text/AllEmojisTest.java
index e2c267a..d703043 100644
--- a/emoji/emoji/src/androidTest/java/androidx/emoji/text/AllEmojisTest.java
+++ b/emoji/emoji/src/androidTest/java/androidx/emoji/text/AllEmojisTest.java
@@ -18,7 +18,7 @@
import static androidx.emoji.util.EmojiMatcher.hasEmojiAt;
import static androidx.emoji.util.EmojiMatcher.hasEmojiCount;
-import static org.junit.Assert.assertThat;
+import static org.hamcrest.MatcherAssert.assertThat;
import static org.junit.Assert.assertTrue;
import android.content.Context;
diff --git a/emoji/emoji/src/androidTest/java/androidx/emoji/text/ConfigTest.java b/emoji/emoji/src/androidTest/java/androidx/emoji/text/ConfigTest.java
index 73ac123..8c9c7c3 100644
--- a/emoji/emoji/src/androidTest/java/androidx/emoji/text/ConfigTest.java
+++ b/emoji/emoji/src/androidTest/java/androidx/emoji/text/ConfigTest.java
@@ -19,10 +19,10 @@
import static androidx.emoji.util.EmojiMatcher.hasEmoji;
import static androidx.emoji.util.EmojiMatcher.hasEmojiCount;
+import static org.hamcrest.MatcherAssert.assertThat;
import static org.hamcrest.Matchers.not;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertThat;
import static org.junit.Assert.assertTrue;
import static org.mockito.ArgumentMatchers.any;
import static org.mockito.ArgumentMatchers.anyInt;
diff --git a/emoji/emoji/src/androidTest/java/androidx/emoji/text/EmojiCompatTest.java b/emoji/emoji/src/androidTest/java/androidx/emoji/text/EmojiCompatTest.java
index 1ff7816..f659cee 100644
--- a/emoji/emoji/src/androidTest/java/androidx/emoji/text/EmojiCompatTest.java
+++ b/emoji/emoji/src/androidTest/java/androidx/emoji/text/EmojiCompatTest.java
@@ -41,6 +41,7 @@
import static androidx.emoji.util.EmojiMatcher.hasEmojiCount;
import static androidx.emoji.util.KeyboardUtil.del;
+import static org.hamcrest.MatcherAssert.assertThat;
import static org.hamcrest.Matchers.instanceOf;
import static org.hamcrest.Matchers.not;
import static org.junit.Assert.assertEquals;
@@ -48,7 +49,6 @@
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertNull;
import static org.junit.Assert.assertSame;
-import static org.junit.Assert.assertThat;
import static org.junit.Assert.assertTrue;
import static org.mockito.ArgumentMatchers.any;
import static org.mockito.ArgumentMatchers.anyInt;
diff --git a/emoji/emoji/src/androidTest/java/androidx/emoji/text/EmojiKeyboardTest.java b/emoji/emoji/src/androidTest/java/androidx/emoji/text/EmojiKeyboardTest.java
index 0f0c808..a241bc1 100644
--- a/emoji/emoji/src/androidTest/java/androidx/emoji/text/EmojiKeyboardTest.java
+++ b/emoji/emoji/src/androidTest/java/androidx/emoji/text/EmojiKeyboardTest.java
@@ -21,8 +21,8 @@
import static androidx.emoji.util.KeyboardUtil.del;
import static androidx.emoji.util.KeyboardUtil.forwardDel;
+import static org.hamcrest.MatcherAssert.assertThat;
import static org.hamcrest.core.IsNot.not;
-import static org.junit.Assert.assertThat;
import android.app.Instrumentation;
import android.text.Editable;
diff --git a/emoji/emoji/src/androidTest/java/androidx/emoji/text/EmojiSpanInstrumentationTest.java b/emoji/emoji/src/androidTest/java/androidx/emoji/text/EmojiSpanInstrumentationTest.java
index 15beb23..4cc43d8 100644
--- a/emoji/emoji/src/androidTest/java/androidx/emoji/text/EmojiSpanInstrumentationTest.java
+++ b/emoji/emoji/src/androidTest/java/androidx/emoji/text/EmojiSpanInstrumentationTest.java
@@ -19,9 +19,9 @@
import static androidx.emoji.util.Emoji.EMOJI_SINGLE_CODEPOINT;
import static androidx.emoji.util.EmojiMatcher.hasEmojiCount;
+import static org.hamcrest.MatcherAssert.assertThat;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertThat;
import android.app.Instrumentation;
import android.text.Spannable;
diff --git a/emoji/emoji/src/androidTest/java/androidx/emoji/text/FontRequestEmojiCompatConfigTest.java b/emoji/emoji/src/androidTest/java/androidx/emoji/text/FontRequestEmojiCompatConfigTest.java
index f13cbf0..5a65bc1 100644
--- a/emoji/emoji/src/androidTest/java/androidx/emoji/text/FontRequestEmojiCompatConfigTest.java
+++ b/emoji/emoji/src/androidTest/java/androidx/emoji/text/FontRequestEmojiCompatConfigTest.java
@@ -26,7 +26,7 @@
import static androidx.core.provider.FontsContractCompat.FontFamilyResult.STATUS_WRONG_CERTIFICATES;
import static org.hamcrest.CoreMatchers.containsString;
-import static org.junit.Assert.assertThat;
+import static org.hamcrest.MatcherAssert.assertThat;
import static org.junit.Assert.fail;
import static org.mockito.ArgumentMatchers.any;
import static org.mockito.ArgumentMatchers.eq;
diff --git a/emoji/emoji/src/androidTest/java/androidx/emoji/widget/EmojiEditTextHelperTest.java b/emoji/emoji/src/androidTest/java/androidx/emoji/widget/EmojiEditTextHelperTest.java
index b4004e0..4ff0979 100644
--- a/emoji/emoji/src/androidTest/java/androidx/emoji/widget/EmojiEditTextHelperTest.java
+++ b/emoji/emoji/src/androidTest/java/androidx/emoji/widget/EmojiEditTextHelperTest.java
@@ -17,11 +17,11 @@
package androidx.emoji.widget;
import static org.hamcrest.CoreMatchers.instanceOf;
+import static org.hamcrest.MatcherAssert.assertThat;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertNull;
import static org.junit.Assert.assertSame;
-import static org.junit.Assert.assertThat;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.times;
import static org.mockito.Mockito.verify;
diff --git a/emoji/emoji/src/androidTest/java/androidx/emoji/widget/EmojiEditableFactoryTest.java b/emoji/emoji/src/androidTest/java/androidx/emoji/widget/EmojiEditableFactoryTest.java
index 9f290b3..cdd6b6f 100644
--- a/emoji/emoji/src/androidTest/java/androidx/emoji/widget/EmojiEditableFactoryTest.java
+++ b/emoji/emoji/src/androidTest/java/androidx/emoji/widget/EmojiEditableFactoryTest.java
@@ -15,12 +15,12 @@
*/
package androidx.emoji.widget;
+import static org.hamcrest.MatcherAssert.assertThat;
import static org.hamcrest.Matchers.arrayWithSize;
import static org.hamcrest.Matchers.instanceOf;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertSame;
-import static org.junit.Assert.assertThat;
import static org.mockito.Mockito.mock;
import android.annotation.SuppressLint;
diff --git a/emoji/emoji/src/androidTest/java/androidx/emoji/widget/EmojiTextViewHelperTest.java b/emoji/emoji/src/androidTest/java/androidx/emoji/widget/EmojiTextViewHelperTest.java
index f3d069a..70b4c36 100644
--- a/emoji/emoji/src/androidTest/java/androidx/emoji/widget/EmojiTextViewHelperTest.java
+++ b/emoji/emoji/src/androidTest/java/androidx/emoji/widget/EmojiTextViewHelperTest.java
@@ -18,11 +18,11 @@
import static org.hamcrest.CoreMatchers.hasItem;
import static org.hamcrest.CoreMatchers.instanceOf;
+import static org.hamcrest.MatcherAssert.assertThat;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertNull;
import static org.junit.Assert.assertSame;
-import static org.junit.Assert.assertThat;
import static org.mockito.Mockito.mock;
import android.text.InputFilter;
diff --git a/emoji/emoji/src/androidTest/java/androidx/emoji/widget/SpannableBuilderTest.java b/emoji/emoji/src/androidTest/java/androidx/emoji/widget/SpannableBuilderTest.java
index 25b29eb..21f4313 100644
--- a/emoji/emoji/src/androidTest/java/androidx/emoji/widget/SpannableBuilderTest.java
+++ b/emoji/emoji/src/androidTest/java/androidx/emoji/widget/SpannableBuilderTest.java
@@ -15,12 +15,12 @@
*/
package androidx.emoji.widget;
+import static org.hamcrest.MatcherAssert.assertThat;
import static org.hamcrest.Matchers.arrayWithSize;
import static org.hamcrest.Matchers.instanceOf;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertSame;
-import static org.junit.Assert.assertThat;
import static org.mockito.ArgumentMatchers.any;
import static org.mockito.ArgumentMatchers.anyInt;
import static org.mockito.ArgumentMatchers.anyObject;
diff --git a/emoji2/emoji2-bundled/build.gradle b/emoji2/emoji2-bundled/build.gradle
index 98b063f..07ff5e6 100644
--- a/emoji2/emoji2-bundled/build.gradle
+++ b/emoji2/emoji2-bundled/build.gradle
@@ -1,5 +1,4 @@
import androidx.build.LibraryGroups
-import androidx.build.LibraryVersions
import androidx.build.Publish
plugins {
diff --git a/emoji2/emoji2-bundled/src/androidTest/java/androidx/emoji2/bundled/AllEmojisTest.java b/emoji2/emoji2-bundled/src/androidTest/java/androidx/emoji2/bundled/AllEmojisTest.java
index 2255f3c..8e160da 100644
--- a/emoji2/emoji2-bundled/src/androidTest/java/androidx/emoji2/bundled/AllEmojisTest.java
+++ b/emoji2/emoji2-bundled/src/androidTest/java/androidx/emoji2/bundled/AllEmojisTest.java
@@ -15,8 +15,8 @@
*/
package androidx.emoji2.bundled;
+import static org.hamcrest.MatcherAssert.assertThat;
import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertThat;
import static org.junit.Assert.assertTrue;
import android.content.Context;
diff --git a/emoji2/emoji2-bundled/src/androidTest/java/androidx/emoji2/bundled/ConfigTest.java b/emoji2/emoji2-bundled/src/androidTest/java/androidx/emoji2/bundled/ConfigTest.java
index fb1be38..7aff447 100644
--- a/emoji2/emoji2-bundled/src/androidTest/java/androidx/emoji2/bundled/ConfigTest.java
+++ b/emoji2/emoji2-bundled/src/androidTest/java/androidx/emoji2/bundled/ConfigTest.java
@@ -15,9 +15,9 @@
*/
package androidx.emoji2.bundled;
+import static org.hamcrest.MatcherAssert.assertThat;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertThat;
import static org.junit.Assert.assertTrue;
import static org.mockito.ArgumentMatchers.any;
import static org.mockito.ArgumentMatchers.anyInt;
diff --git a/emoji2/emoji2-bundled/src/androidTest/java/androidx/emoji2/bundled/EmojiCompatTest.java b/emoji2/emoji2-bundled/src/androidTest/java/androidx/emoji2/bundled/EmojiCompatTest.java
index ba8fb42..3ae949c 100644
--- a/emoji2/emoji2-bundled/src/androidTest/java/androidx/emoji2/bundled/EmojiCompatTest.java
+++ b/emoji2/emoji2-bundled/src/androidTest/java/androidx/emoji2/bundled/EmojiCompatTest.java
@@ -15,13 +15,13 @@
*/
package androidx.emoji2.bundled;
+import static org.hamcrest.MatcherAssert.assertThat;
import static org.hamcrest.Matchers.instanceOf;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertNull;
import static org.junit.Assert.assertSame;
-import static org.junit.Assert.assertThat;
import static org.junit.Assert.assertTrue;
import static org.mockito.ArgumentMatchers.any;
import static org.mockito.ArgumentMatchers.anyInt;
diff --git a/emoji2/emoji2-bundled/src/androidTest/java/androidx/emoji2/bundled/EmojiKeyboardTest.java b/emoji2/emoji2-bundled/src/androidTest/java/androidx/emoji2/bundled/EmojiKeyboardTest.java
index 8b4de90..8e2ab48 100644
--- a/emoji2/emoji2-bundled/src/androidTest/java/androidx/emoji2/bundled/EmojiKeyboardTest.java
+++ b/emoji2/emoji2-bundled/src/androidTest/java/androidx/emoji2/bundled/EmojiKeyboardTest.java
@@ -15,7 +15,7 @@
*/
package androidx.emoji2.bundled;
-import static org.junit.Assert.assertThat;
+import static org.hamcrest.MatcherAssert.assertThat;
import android.app.Instrumentation;
import android.text.Editable;
diff --git a/emoji2/emoji2-bundled/src/androidTest/java/androidx/emoji2/bundled/EmojiSpanInstrumentationTest.java b/emoji2/emoji2-bundled/src/androidTest/java/androidx/emoji2/bundled/EmojiSpanInstrumentationTest.java
index 7ece287..6c9eb50 100644
--- a/emoji2/emoji2-bundled/src/androidTest/java/androidx/emoji2/bundled/EmojiSpanInstrumentationTest.java
+++ b/emoji2/emoji2-bundled/src/androidTest/java/androidx/emoji2/bundled/EmojiSpanInstrumentationTest.java
@@ -16,9 +16,9 @@
package androidx.emoji2.bundled;
+import static org.hamcrest.MatcherAssert.assertThat;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertThat;
import android.app.Instrumentation;
import android.text.Spannable;
diff --git a/emoji2/emoji2-bundled/src/androidTest/java/androidx/emoji2/bundled/FontRequestEmojiCompatConfigTest.java b/emoji2/emoji2-bundled/src/androidTest/java/androidx/emoji2/bundled/FontRequestEmojiCompatConfigTest.java
index 463a132..0366734 100644
--- a/emoji2/emoji2-bundled/src/androidTest/java/androidx/emoji2/bundled/FontRequestEmojiCompatConfigTest.java
+++ b/emoji2/emoji2-bundled/src/androidTest/java/androidx/emoji2/bundled/FontRequestEmojiCompatConfigTest.java
@@ -26,7 +26,7 @@
import static androidx.core.provider.FontsContractCompat.FontFamilyResult.STATUS_WRONG_CERTIFICATES;
import static org.hamcrest.CoreMatchers.containsString;
-import static org.junit.Assert.assertThat;
+import static org.hamcrest.MatcherAssert.assertThat;
import static org.junit.Assert.fail;
import static org.mockito.ArgumentMatchers.any;
import static org.mockito.ArgumentMatchers.eq;
diff --git a/emoji2/emoji2-bundled/src/androidTest/java/androidx/emoji2/bundled/viewstests/EmojiEditTextParameters.java b/emoji2/emoji2-bundled/src/androidTest/java/androidx/emoji2/bundled/viewstests/EmojiEditTextParameters.java
index a71951c..f1f76b9 100644
--- a/emoji2/emoji2-bundled/src/androidTest/java/androidx/emoji2/bundled/viewstests/EmojiEditTextParameters.java
+++ b/emoji2/emoji2-bundled/src/androidTest/java/androidx/emoji2/bundled/viewstests/EmojiEditTextParameters.java
@@ -16,7 +16,7 @@
package androidx.emoji2.bundled.viewstests;
-import static org.junit.Assert.assertThat;
+import static org.hamcrest.MatcherAssert.assertThat;
import android.app.Instrumentation;
diff --git a/emoji2/emoji2-bundled/src/androidTest/java/androidx/emoji2/bundled/viewstests/EmojiEditTextProcessesText.java b/emoji2/emoji2-bundled/src/androidTest/java/androidx/emoji2/bundled/viewstests/EmojiEditTextProcessesText.java
index d782cf7..84ec876 100644
--- a/emoji2/emoji2-bundled/src/androidTest/java/androidx/emoji2/bundled/viewstests/EmojiEditTextProcessesText.java
+++ b/emoji2/emoji2-bundled/src/androidTest/java/androidx/emoji2/bundled/viewstests/EmojiEditTextProcessesText.java
@@ -16,7 +16,7 @@
package androidx.emoji2.bundled.viewstests;
-import static org.junit.Assert.assertThat;
+import static org.hamcrest.MatcherAssert.assertThat;
import android.app.Instrumentation;
diff --git a/emoji2/emoji2-bundled/src/androidTest/java/androidx/emoji2/bundled/viewstests/EmojiTextViewProcessTest.java b/emoji2/emoji2-bundled/src/androidTest/java/androidx/emoji2/bundled/viewstests/EmojiTextViewProcessTest.java
index 8bc8a79..b102b10 100644
--- a/emoji2/emoji2-bundled/src/androidTest/java/androidx/emoji2/bundled/viewstests/EmojiTextViewProcessTest.java
+++ b/emoji2/emoji2-bundled/src/androidTest/java/androidx/emoji2/bundled/viewstests/EmojiTextViewProcessTest.java
@@ -16,7 +16,7 @@
package androidx.emoji2.bundled.viewstests;
-import static org.junit.Assert.assertThat;
+import static org.hamcrest.MatcherAssert.assertThat;
import android.app.Instrumentation;
import android.widget.TextView;
diff --git a/emoji2/emoji2-views-helper/build.gradle b/emoji2/emoji2-views-helper/build.gradle
index ce6c115..f2c2f18 100644
--- a/emoji2/emoji2-views-helper/build.gradle
+++ b/emoji2/emoji2-views-helper/build.gradle
@@ -1,5 +1,4 @@
import androidx.build.LibraryGroups
-import androidx.build.LibraryVersions
import androidx.build.Publish
plugins {
diff --git a/emoji2/emoji2-views-helper/src/androidTest/java/androidx/emoji2/viewsintegration/EmojiEditTextHelperDisabledTest.java b/emoji2/emoji2-views-helper/src/androidTest/java/androidx/emoji2/viewsintegration/EmojiEditTextHelperDisabledTest.java
index 070c8b1..aed93b1 100644
--- a/emoji2/emoji2-views-helper/src/androidTest/java/androidx/emoji2/viewsintegration/EmojiEditTextHelperDisabledTest.java
+++ b/emoji2/emoji2-views-helper/src/androidTest/java/androidx/emoji2/viewsintegration/EmojiEditTextHelperDisabledTest.java
@@ -17,11 +17,11 @@
package androidx.emoji2.viewsintegration;
import static org.hamcrest.CoreMatchers.instanceOf;
+import static org.hamcrest.MatcherAssert.assertThat;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertSame;
-import static org.junit.Assert.assertThat;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.times;
import static org.mockito.Mockito.verify;
diff --git a/emoji2/emoji2-views-helper/src/androidTest/java/androidx/emoji2/viewsintegration/EmojiEditTextHelperTest.java b/emoji2/emoji2-views-helper/src/androidTest/java/androidx/emoji2/viewsintegration/EmojiEditTextHelperTest.java
index c371814..50399d5 100644
--- a/emoji2/emoji2-views-helper/src/androidTest/java/androidx/emoji2/viewsintegration/EmojiEditTextHelperTest.java
+++ b/emoji2/emoji2-views-helper/src/androidTest/java/androidx/emoji2/viewsintegration/EmojiEditTextHelperTest.java
@@ -17,12 +17,12 @@
package androidx.emoji2.viewsintegration;
import static org.hamcrest.CoreMatchers.instanceOf;
+import static org.hamcrest.MatcherAssert.assertThat;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertNull;
import static org.junit.Assert.assertSame;
-import static org.junit.Assert.assertThat;
import static org.junit.Assert.assertTrue;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.times;
diff --git a/emoji2/emoji2-views-helper/src/androidTest/java/androidx/emoji2/viewsintegration/EmojiEditableFactoryTest.java b/emoji2/emoji2-views-helper/src/androidTest/java/androidx/emoji2/viewsintegration/EmojiEditableFactoryTest.java
index 9f92fb1..e7862f4 100644
--- a/emoji2/emoji2-views-helper/src/androidTest/java/androidx/emoji2/viewsintegration/EmojiEditableFactoryTest.java
+++ b/emoji2/emoji2-views-helper/src/androidTest/java/androidx/emoji2/viewsintegration/EmojiEditableFactoryTest.java
@@ -15,12 +15,12 @@
*/
package androidx.emoji2.viewsintegration;
+import static org.hamcrest.MatcherAssert.assertThat;
import static org.hamcrest.Matchers.arrayWithSize;
import static org.hamcrest.Matchers.instanceOf;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertSame;
-import static org.junit.Assert.assertThat;
import static org.mockito.Mockito.mock;
import android.annotation.SuppressLint;
diff --git a/emoji2/emoji2-views-helper/src/androidTest/java/androidx/emoji2/viewsintegration/EmojiTextViewHelperTest.java b/emoji2/emoji2-views-helper/src/androidTest/java/androidx/emoji2/viewsintegration/EmojiTextViewHelperTest.java
index 39a1bdc..bb51061 100644
--- a/emoji2/emoji2-views-helper/src/androidTest/java/androidx/emoji2/viewsintegration/EmojiTextViewHelperTest.java
+++ b/emoji2/emoji2-views-helper/src/androidTest/java/androidx/emoji2/viewsintegration/EmojiTextViewHelperTest.java
@@ -20,11 +20,11 @@
import static org.hamcrest.CoreMatchers.hasItem;
import static org.hamcrest.CoreMatchers.instanceOf;
import static org.hamcrest.CoreMatchers.is;
+import static org.hamcrest.MatcherAssert.assertThat;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertNull;
import static org.junit.Assert.assertSame;
-import static org.junit.Assert.assertThat;
import static org.mockito.Mockito.mock;
import android.text.InputFilter;
diff --git a/emoji2/emoji2-views/build.gradle b/emoji2/emoji2-views/build.gradle
index 32c718dc..7727d18 100644
--- a/emoji2/emoji2-views/build.gradle
+++ b/emoji2/emoji2-views/build.gradle
@@ -1,5 +1,4 @@
import androidx.build.LibraryGroups
-import androidx.build.LibraryVersions
import androidx.build.Publish
plugins {
diff --git a/emoji2/emoji2/build.gradle b/emoji2/emoji2/build.gradle
index 9e153d2..55c6c51a 100644
--- a/emoji2/emoji2/build.gradle
+++ b/emoji2/emoji2/build.gradle
@@ -1,6 +1,5 @@
import androidx.build.BundleInsideHelper
import androidx.build.LibraryGroups
-import androidx.build.LibraryVersions
import androidx.build.Publish
plugins {
diff --git a/emoji2/emoji2/src/androidTest/java/androidx/emoji2/text/SpannableBuilderTest.java b/emoji2/emoji2/src/androidTest/java/androidx/emoji2/text/SpannableBuilderTest.java
index bbbbe48..e161443 100644
--- a/emoji2/emoji2/src/androidTest/java/androidx/emoji2/text/SpannableBuilderTest.java
+++ b/emoji2/emoji2/src/androidTest/java/androidx/emoji2/text/SpannableBuilderTest.java
@@ -15,12 +15,12 @@
*/
package androidx.emoji2.text;
+import static org.hamcrest.MatcherAssert.assertThat;
import static org.hamcrest.Matchers.arrayWithSize;
import static org.hamcrest.Matchers.instanceOf;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertSame;
-import static org.junit.Assert.assertThat;
import static org.mockito.ArgumentMatchers.any;
import static org.mockito.ArgumentMatchers.anyInt;
import static org.mockito.ArgumentMatchers.anyObject;
diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml
index 576df3e..8bce553d 100644
--- a/gradle/libs.versions.toml
+++ b/gradle/libs.versions.toml
@@ -85,7 +85,7 @@
javapoet = { module = "com.squareup:javapoet", version = "1.13.0" }
jsqlparser = { module = "com.github.jsqlparser:jsqlparser", version = "3.1" }
jsr250 = { module = "javax.annotation:javax.annotation-api", version = "1.2" }
-junit = { module = "junit:junit", version = "4.12" }
+junit = { module = "junit:junit", version = "4.13.2" }
gcmNetworkManager = { module = "com.google.android.gms:play-services-gcm", version = "17.0.0" }
googleCompileTesting = { module = "com.google.testing.compile:compile-testing", version = "0.18" }
gson = { module = "com.google.code.gson:gson", version = "2.8.0" }
diff --git a/gridlayout/gridlayout/src/androidTest/java/androidx/gridlayout/widget/TestContentView.java b/gridlayout/gridlayout/src/androidTest/java/androidx/gridlayout/widget/TestContentView.java
index 62648fd0..1d92ffd 100644
--- a/gridlayout/gridlayout/src/androidTest/java/androidx/gridlayout/widget/TestContentView.java
+++ b/gridlayout/gridlayout/src/androidTest/java/androidx/gridlayout/widget/TestContentView.java
@@ -17,7 +17,7 @@
package androidx.gridlayout.widget;
import static org.hamcrest.CoreMatchers.equalTo;
-import static org.junit.Assert.assertThat;
+import static org.hamcrest.MatcherAssert.assertThat;
import android.content.Context;
import android.util.AttributeSet;
diff --git a/jetifier/jetifier/core/build.gradle b/jetifier/jetifier/core/build.gradle
index 7e6696f..055b4ec 100644
--- a/jetifier/jetifier/core/build.gradle
+++ b/jetifier/jetifier/core/build.gradle
@@ -27,7 +27,7 @@
dependencies {
api("com.google.code.gson:gson:2.8.0")
api(libs.kotlinStdlib)
- testImplementation("junit:junit:4.12")
+ testImplementation(libs.junit)
testImplementation(libs.truth)
}
diff --git a/jetifier/jetifier/processor/build.gradle b/jetifier/jetifier/processor/build.gradle
index c8b60e2..13a1520 100644
--- a/jetifier/jetifier/processor/build.gradle
+++ b/jetifier/jetifier/processor/build.gradle
@@ -31,7 +31,7 @@
api("org.jdom:jdom2:2.0.6")
api(libs.kotlinStdlib)
api(libs.kotlinMetadataJvm)
- testImplementation("junit:junit:4.12")
+ testImplementation(libs.junit)
testImplementation(libs.truth)
testImplementation(libs.kotlinReflect)
testImplementation(libs.kotlinCompileTesting)
diff --git a/media/version-compat-tests/current/client/src/androidTest/java/android/support/mediacompat/client/AudioAttributesCompatTest.java b/media/version-compat-tests/current/client/src/androidTest/java/android/support/mediacompat/client/AudioAttributesCompatTest.java
index 345bc7b..6cc962e 100644
--- a/media/version-compat-tests/current/client/src/androidTest/java/android/support/mediacompat/client/AudioAttributesCompatTest.java
+++ b/media/version-compat-tests/current/client/src/androidTest/java/android/support/mediacompat/client/AudioAttributesCompatTest.java
@@ -15,9 +15,9 @@
*/
package android.support.mediacompat.client;
+import static org.hamcrest.MatcherAssert.assertThat;
import static org.hamcrest.core.IsEqual.equalTo;
import static org.hamcrest.core.IsNot.not;
-import static org.junit.Assert.assertThat;
import android.media.AudioAttributes;
import android.media.AudioManager;
diff --git a/media/version-compat-tests/previous/client/src/androidTest/java/android/support/mediacompat/client/AudioAttributesCompatTest.java b/media/version-compat-tests/previous/client/src/androidTest/java/android/support/mediacompat/client/AudioAttributesCompatTest.java
index 345bc7b..6cc962e 100644
--- a/media/version-compat-tests/previous/client/src/androidTest/java/android/support/mediacompat/client/AudioAttributesCompatTest.java
+++ b/media/version-compat-tests/previous/client/src/androidTest/java/android/support/mediacompat/client/AudioAttributesCompatTest.java
@@ -15,9 +15,9 @@
*/
package android.support.mediacompat.client;
+import static org.hamcrest.MatcherAssert.assertThat;
import static org.hamcrest.core.IsEqual.equalTo;
import static org.hamcrest.core.IsNot.not;
-import static org.junit.Assert.assertThat;
import android.media.AudioAttributes;
import android.media.AudioManager;
diff --git a/preference/preference/src/androidTest/java/androidx/preference/tests/PreferencePersistTest.java b/preference/preference/src/androidTest/java/androidx/preference/tests/PreferencePersistTest.java
index cc5cacb..5c1b803 100644
--- a/preference/preference/src/androidTest/java/androidx/preference/tests/PreferencePersistTest.java
+++ b/preference/preference/src/androidTest/java/androidx/preference/tests/PreferencePersistTest.java
@@ -16,11 +16,11 @@
package androidx.preference.tests;
+import static org.hamcrest.MatcherAssert.assertThat;
import static org.hamcrest.collection.IsIterableContainingInAnyOrder.containsInAnyOrder;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertNull;
-import static org.junit.Assert.assertThat;
import static org.junit.Assert.assertTrue;
import android.content.Context;
diff --git a/recyclerview/recyclerview/src/androidTest/java/androidx/recyclerview/widget/RecyclerViewSmoothScrollToPositionTest.kt b/recyclerview/recyclerview/src/androidTest/java/androidx/recyclerview/widget/RecyclerViewSmoothScrollToPositionTest.kt
index 3314012..6fdbaf7 100644
--- a/recyclerview/recyclerview/src/androidTest/java/androidx/recyclerview/widget/RecyclerViewSmoothScrollToPositionTest.kt
+++ b/recyclerview/recyclerview/src/androidTest/java/androidx/recyclerview/widget/RecyclerViewSmoothScrollToPositionTest.kt
@@ -24,7 +24,7 @@
import androidx.test.filters.LargeTest
import org.hamcrest.CoreMatchers.`is`
import org.junit.Assert
-import org.junit.Assert.assertThat
+import org.hamcrest.MatcherAssert.assertThat
import org.junit.Rule
import org.junit.Test
import org.junit.runner.RunWith
diff --git a/room/integration-tests/testapp/src/androidTest/java/androidx/room/integration/testapp/migration/ProvidedAutoMigrationSpecTest.java b/room/integration-tests/testapp/src/androidTest/java/androidx/room/integration/testapp/migration/ProvidedAutoMigrationSpecTest.java
index 6fdb83b..97d1027 100644
--- a/room/integration-tests/testapp/src/androidTest/java/androidx/room/integration/testapp/migration/ProvidedAutoMigrationSpecTest.java
+++ b/room/integration-tests/testapp/src/androidTest/java/androidx/room/integration/testapp/migration/ProvidedAutoMigrationSpecTest.java
@@ -18,7 +18,7 @@
import static org.hamcrest.CoreMatchers.containsString;
import static org.hamcrest.CoreMatchers.is;
-import static org.junit.Assert.assertThat;
+import static org.hamcrest.MatcherAssert.assertThat;
import androidx.annotation.NonNull;
import androidx.room.AutoMigration;
diff --git a/room/integration-tests/testapp/src/androidTest/java/androidx/room/integration/testapp/test/ClearAllTablesTest.java b/room/integration-tests/testapp/src/androidTest/java/androidx/room/integration/testapp/test/ClearAllTablesTest.java
index 8dc53e9..4066106 100644
--- a/room/integration-tests/testapp/src/androidTest/java/androidx/room/integration/testapp/test/ClearAllTablesTest.java
+++ b/room/integration-tests/testapp/src/androidTest/java/androidx/room/integration/testapp/test/ClearAllTablesTest.java
@@ -20,8 +20,8 @@
import static org.hamcrest.CoreMatchers.equalTo;
import static org.hamcrest.CoreMatchers.hasItem;
import static org.hamcrest.CoreMatchers.is;
+import static org.hamcrest.MatcherAssert.assertThat;
import static org.hamcrest.collection.IsCollectionWithSize.hasSize;
-import static org.junit.Assert.assertThat;
import static org.junit.Assert.fail;
import android.content.Context;
diff --git a/room/integration-tests/testapp/src/androidTest/java/androidx/room/integration/testapp/test/DatabaseViewTest.java b/room/integration-tests/testapp/src/androidTest/java/androidx/room/integration/testapp/test/DatabaseViewTest.java
index 9c1bb03..c5bdb80 100644
--- a/room/integration-tests/testapp/src/androidTest/java/androidx/room/integration/testapp/test/DatabaseViewTest.java
+++ b/room/integration-tests/testapp/src/androidTest/java/androidx/room/integration/testapp/test/DatabaseViewTest.java
@@ -19,8 +19,8 @@
import static org.hamcrest.CoreMatchers.equalTo;
import static org.hamcrest.CoreMatchers.is;
import static org.hamcrest.CoreMatchers.nullValue;
+import static org.hamcrest.MatcherAssert.assertThat;
import static org.hamcrest.collection.IsCollectionWithSize.hasSize;
-import static org.junit.Assert.assertThat;
import static org.mockito.ArgumentMatchers.argThat;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.reset;
diff --git a/room/integration-tests/testapp/src/androidTest/java/androidx/room/integration/testapp/test/DefaultValueTest.java b/room/integration-tests/testapp/src/androidTest/java/androidx/room/integration/testapp/test/DefaultValueTest.java
index 24f544f..3045e24 100644
--- a/room/integration-tests/testapp/src/androidTest/java/androidx/room/integration/testapp/test/DefaultValueTest.java
+++ b/room/integration-tests/testapp/src/androidTest/java/androidx/room/integration/testapp/test/DefaultValueTest.java
@@ -18,8 +18,8 @@
import static org.hamcrest.CoreMatchers.equalTo;
import static org.hamcrest.CoreMatchers.is;
+import static org.hamcrest.MatcherAssert.assertThat;
import static org.hamcrest.Matchers.closeTo;
-import static org.junit.Assert.assertThat;
import android.content.Context;
diff --git a/room/integration-tests/testapp/src/androidTest/java/androidx/room/integration/testapp/test/EnumColumnTypeAdapterTest.java b/room/integration-tests/testapp/src/androidTest/java/androidx/room/integration/testapp/test/EnumColumnTypeAdapterTest.java
index 13b47e4..69552b0 100644
--- a/room/integration-tests/testapp/src/androidTest/java/androidx/room/integration/testapp/test/EnumColumnTypeAdapterTest.java
+++ b/room/integration-tests/testapp/src/androidTest/java/androidx/room/integration/testapp/test/EnumColumnTypeAdapterTest.java
@@ -18,7 +18,7 @@
import static org.hamcrest.CoreMatchers.equalTo;
import static org.hamcrest.CoreMatchers.is;
-import static org.junit.Assert.assertThat;
+import static org.hamcrest.MatcherAssert.assertThat;
import android.content.Context;
diff --git a/room/integration-tests/testapp/src/androidTest/java/androidx/room/integration/testapp/test/OnConflictStrategyTest.java b/room/integration-tests/testapp/src/androidTest/java/androidx/room/integration/testapp/test/OnConflictStrategyTest.java
index 4e10721..579a16e 100644
--- a/room/integration-tests/testapp/src/androidTest/java/androidx/room/integration/testapp/test/OnConflictStrategyTest.java
+++ b/room/integration-tests/testapp/src/androidTest/java/androidx/room/integration/testapp/test/OnConflictStrategyTest.java
@@ -20,8 +20,8 @@
import static org.hamcrest.CoreMatchers.hasItems;
import static org.hamcrest.CoreMatchers.is;
import static org.hamcrest.CoreMatchers.notNullValue;
+import static org.hamcrest.MatcherAssert.assertThat;
import static org.hamcrest.collection.IsCollectionWithSize.hasSize;
-import static org.junit.Assert.assertThat;
import static org.junit.Assert.fail;
import android.content.Context;
diff --git a/room/integration-tests/testapp/src/androidTest/java/androidx/room/integration/testapp/test/PrepackageTest.java b/room/integration-tests/testapp/src/androidTest/java/androidx/room/integration/testapp/test/PrepackageTest.java
index d822ea7..af3cc30 100644
--- a/room/integration-tests/testapp/src/androidTest/java/androidx/room/integration/testapp/test/PrepackageTest.java
+++ b/room/integration-tests/testapp/src/androidTest/java/androidx/room/integration/testapp/test/PrepackageTest.java
@@ -19,7 +19,7 @@
import static org.hamcrest.CoreMatchers.containsString;
import static org.hamcrest.CoreMatchers.instanceOf;
import static org.hamcrest.CoreMatchers.is;
-import static org.junit.Assert.assertThat;
+import static org.hamcrest.MatcherAssert.assertThat;
import static org.junit.Assert.fail;
import android.content.Context;
diff --git a/room/room-migration/src/test/java/androidx/room/migration/bundle/DatabaseViewBundleTest.java b/room/room-migration/src/test/java/androidx/room/migration/bundle/DatabaseViewBundleTest.java
index bf4baa2..a6d674a 100644
--- a/room/room-migration/src/test/java/androidx/room/migration/bundle/DatabaseViewBundleTest.java
+++ b/room/room-migration/src/test/java/androidx/room/migration/bundle/DatabaseViewBundleTest.java
@@ -18,7 +18,7 @@
import static org.hamcrest.CoreMatchers.equalTo;
import static org.hamcrest.CoreMatchers.is;
-import static org.junit.Assert.assertThat;
+import static org.hamcrest.MatcherAssert.assertThat;
import org.junit.Test;
import org.junit.runner.RunWith;
diff --git a/room/room-runtime/src/androidTest/java/androidx/room/util/DBUtilTest.java b/room/room-runtime/src/androidTest/java/androidx/room/util/DBUtilTest.java
index 77437f1..4c74976 100644
--- a/room/room-runtime/src/androidTest/java/androidx/room/util/DBUtilTest.java
+++ b/room/room-runtime/src/androidTest/java/androidx/room/util/DBUtilTest.java
@@ -17,7 +17,7 @@
package androidx.room.util;
import static org.hamcrest.CoreMatchers.notNullValue;
-import static org.junit.Assert.assertThat;
+import static org.hamcrest.MatcherAssert.assertThat;
import static org.junit.Assert.assertTrue;
import android.database.AbstractWindowedCursor;
diff --git a/security/security-app-authenticator-testing/build.gradle b/security/security-app-authenticator-testing/build.gradle
index 7d1d4da..e37aed5 100644
--- a/security/security-app-authenticator-testing/build.gradle
+++ b/security/security-app-authenticator-testing/build.gradle
@@ -27,7 +27,7 @@
implementation (project(":security:security-app-authenticator"))
implementation("androidx.collection:collection:1.1.0")
- androidTestImplementation("junit:junit:4.13")
+ androidTestImplementation(libs.junit)
androidTestImplementation(libs.testExtJunit)
androidTestImplementation(libs.testCore)
androidTestImplementation(libs.testRunner)
diff --git a/security/security-app-authenticator/build.gradle b/security/security-app-authenticator/build.gradle
index e74c0c0..3096857 100644
--- a/security/security-app-authenticator/build.gradle
+++ b/security/security-app-authenticator/build.gradle
@@ -29,7 +29,7 @@
annotationProcessor(libs.autoValue)
implementation("androidx.collection:collection:1.1.0")
- testImplementation("junit:junit:4.13")
+ testImplementation(libs.junit)
testImplementation(libs.testExtJunit)
testImplementation(libs.testCore)
testImplementation(libs.testRunner)
@@ -37,7 +37,7 @@
testImplementation(libs.mockitoCore)
testImplementation(libs.robolectric)
- androidTestImplementation("junit:junit:4.13")
+ androidTestImplementation(libs.junit)
androidTestImplementation(libs.testExtJunit)
androidTestImplementation(libs.testCore)
androidTestImplementation(libs.testRunner)
diff --git a/startup/startup-runtime/src/androidTest/java/androidx/startup/AppInitializerTest.kt b/startup/startup-runtime/src/androidTest/java/androidx/startup/AppInitializerTest.kt
index ea9c624..7b54f14f 100644
--- a/startup/startup-runtime/src/androidTest/java/androidx/startup/AppInitializerTest.kt
+++ b/startup/startup-runtime/src/androidTest/java/androidx/startup/AppInitializerTest.kt
@@ -22,7 +22,7 @@
import androidx.test.filters.MediumTest
import org.hamcrest.CoreMatchers.`is`
import org.hamcrest.CoreMatchers.containsString
-import org.junit.Assert.assertThat
+import org.hamcrest.MatcherAssert.assertThat
import org.junit.Assert.assertTrue
import org.junit.Assert.fail
import org.junit.Before
diff --git a/transition/transition/src/androidTest/java/androidx/transition/AutoTransitionTest.java b/transition/transition/src/androidTest/java/androidx/transition/AutoTransitionTest.java
index 29f0820..d85246e 100644
--- a/transition/transition/src/androidTest/java/androidx/transition/AutoTransitionTest.java
+++ b/transition/transition/src/androidTest/java/androidx/transition/AutoTransitionTest.java
@@ -16,8 +16,8 @@
package androidx.transition;
+import static org.hamcrest.MatcherAssert.assertThat;
import static org.hamcrest.core.Is.is;
-import static org.junit.Assert.assertThat;
import static org.junit.Assert.fail;
import android.graphics.Color;
diff --git a/transition/transition/src/androidTest/java/androidx/transition/ChangeBoundsTest.java b/transition/transition/src/androidTest/java/androidx/transition/ChangeBoundsTest.java
index 7e7f751..c1a8962 100644
--- a/transition/transition/src/androidTest/java/androidx/transition/ChangeBoundsTest.java
+++ b/transition/transition/src/androidTest/java/androidx/transition/ChangeBoundsTest.java
@@ -16,10 +16,10 @@
package androidx.transition;
+import static org.hamcrest.MatcherAssert.assertThat;
import static org.hamcrest.core.Is.is;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertThat;
import android.content.Context;
import android.os.Build;
diff --git a/transition/transition/src/androidTest/java/androidx/transition/ExplodeTest.java b/transition/transition/src/androidTest/java/androidx/transition/ExplodeTest.java
index c275a48..34954a9 100644
--- a/transition/transition/src/androidTest/java/androidx/transition/ExplodeTest.java
+++ b/transition/transition/src/androidTest/java/androidx/transition/ExplodeTest.java
@@ -19,7 +19,7 @@
import static org.hamcrest.CoreMatchers.allOf;
import static org.hamcrest.CoreMatchers.is;
import static org.hamcrest.CoreMatchers.not;
-import static org.junit.Assert.assertThat;
+import static org.hamcrest.MatcherAssert.assertThat;
import android.content.Context;
import android.graphics.Color;
diff --git a/transition/transition/src/androidTest/java/androidx/transition/FadeTest.java b/transition/transition/src/androidTest/java/androidx/transition/FadeTest.java
index fa58f8b..16a9bbe 100644
--- a/transition/transition/src/androidTest/java/androidx/transition/FadeTest.java
+++ b/transition/transition/src/androidTest/java/androidx/transition/FadeTest.java
@@ -20,11 +20,11 @@
import static org.hamcrest.CoreMatchers.is;
import static org.hamcrest.CoreMatchers.notNullValue;
import static org.hamcrest.CoreMatchers.nullValue;
+import static org.hamcrest.MatcherAssert.assertThat;
import static org.hamcrest.Matchers.greaterThan;
import static org.hamcrest.Matchers.lessThan;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertThat;
import static org.mockito.ArgumentMatchers.any;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.reset;
diff --git a/transition/transition/src/androidTest/java/androidx/transition/FragmentTestUtil.kt b/transition/transition/src/androidTest/java/androidx/transition/FragmentTestUtil.kt
index 1579cd7b..78fa81c 100644
--- a/transition/transition/src/androidTest/java/androidx/transition/FragmentTestUtil.kt
+++ b/transition/transition/src/androidTest/java/androidx/transition/FragmentTestUtil.kt
@@ -31,7 +31,6 @@
import com.google.common.truth.Truth.assertThat
import com.google.common.truth.Truth.assertWithMessage
import java.lang.ref.WeakReference
-import java.util.ArrayList
fun FragmentTransaction.setReorderingAllowed(
reorderingAllowed: ReorderingAllowed
diff --git a/transition/transition/src/androidTest/java/androidx/transition/PropagationTest.java b/transition/transition/src/androidTest/java/androidx/transition/PropagationTest.java
index 8c6da69..91327c4 100644
--- a/transition/transition/src/androidTest/java/androidx/transition/PropagationTest.java
+++ b/transition/transition/src/androidTest/java/androidx/transition/PropagationTest.java
@@ -16,11 +16,11 @@
package androidx.transition;
+import static org.hamcrest.MatcherAssert.assertThat;
import static org.hamcrest.Matchers.greaterThan;
import static org.hamcrest.Matchers.is;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertThat;
import static org.junit.Assert.assertTrue;
import android.animation.Animator;
diff --git a/transition/transition/src/androidTest/java/androidx/transition/VisibilityTest.java b/transition/transition/src/androidTest/java/androidx/transition/VisibilityTest.java
index dd8cb01..b2db3ab 100644
--- a/transition/transition/src/androidTest/java/androidx/transition/VisibilityTest.java
+++ b/transition/transition/src/androidTest/java/androidx/transition/VisibilityTest.java
@@ -16,12 +16,12 @@
package androidx.transition;
+import static org.hamcrest.MatcherAssert.assertThat;
import static org.hamcrest.core.Is.is;
import static org.hamcrest.core.IsEqual.equalTo;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertNull;
-import static org.junit.Assert.assertThat;
import static org.mockito.ArgumentMatchers.any;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.timeout;
diff --git a/viewpager2/integration-tests/targetsdk-tests/src/androidTest/kotlin/androidx/viewpager2/integration/targetsdktests/OnApplyWindowInsetsListenerTest.kt b/viewpager2/integration-tests/targetsdk-tests/src/androidTest/kotlin/androidx/viewpager2/integration/targetsdktests/OnApplyWindowInsetsListenerTest.kt
index 66e5e72..70aa8ed 100644
--- a/viewpager2/integration-tests/targetsdk-tests/src/androidTest/kotlin/androidx/viewpager2/integration/targetsdktests/OnApplyWindowInsetsListenerTest.kt
+++ b/viewpager2/integration-tests/targetsdk-tests/src/androidTest/kotlin/androidx/viewpager2/integration/targetsdktests/OnApplyWindowInsetsListenerTest.kt
@@ -40,7 +40,7 @@
import androidx.viewpager2.widget.WindowInsetsApplier
import org.hamcrest.CoreMatchers.equalTo
import org.junit.Assert.assertNotNull
-import org.junit.Assert.assertThat
+import org.hamcrest.MatcherAssert.assertThat
import org.junit.Rule
import org.junit.Test
import org.junit.runner.RunWith
diff --git a/viewpager2/integration-tests/testapp/src/androidTest/java/androidx/viewpager2/integration/testapp/test/MarginPageTransformerTest.kt b/viewpager2/integration-tests/testapp/src/androidTest/java/androidx/viewpager2/integration/testapp/test/MarginPageTransformerTest.kt
index 5e65603..24d9b2c 100644
--- a/viewpager2/integration-tests/testapp/src/androidTest/java/androidx/viewpager2/integration/testapp/test/MarginPageTransformerTest.kt
+++ b/viewpager2/integration-tests/testapp/src/androidTest/java/androidx/viewpager2/integration/testapp/test/MarginPageTransformerTest.kt
@@ -34,7 +34,7 @@
import org.hamcrest.Matchers.closeTo
import org.hamcrest.Matchers.equalTo
import org.hamcrest.Matchers.greaterThan
-import org.junit.Assert.assertThat
+import org.hamcrest.MatcherAssert.assertThat
import org.junit.Ignore
import org.junit.Test
import org.junit.runner.RunWith
diff --git a/viewpager2/viewpager2/src/androidTest/java/androidx/viewpager2/widget/AccessibilityTest.kt b/viewpager2/viewpager2/src/androidTest/java/androidx/viewpager2/widget/AccessibilityTest.kt
index 69d007d..afd41feb 100644
--- a/viewpager2/viewpager2/src/androidTest/java/androidx/viewpager2/widget/AccessibilityTest.kt
+++ b/viewpager2/viewpager2/src/androidTest/java/androidx/viewpager2/widget/AccessibilityTest.kt
@@ -28,7 +28,7 @@
import androidx.viewpager2.widget.ViewPager2.ORIENTATION_HORIZONTAL
import androidx.viewpager2.widget.ViewPager2.ORIENTATION_VERTICAL
import org.hamcrest.CoreMatchers.equalTo
-import org.junit.Assert.assertThat
+import org.hamcrest.MatcherAssert.assertThat
import org.junit.Test
import org.junit.runner.RunWith
import org.junit.runners.Parameterized
diff --git a/viewpager2/viewpager2/src/androidTest/java/androidx/viewpager2/widget/AdapterDataSetChangeWhileSmoothScrollTest.kt b/viewpager2/viewpager2/src/androidTest/java/androidx/viewpager2/widget/AdapterDataSetChangeWhileSmoothScrollTest.kt
index 0187be6..643d854 100644
--- a/viewpager2/viewpager2/src/androidTest/java/androidx/viewpager2/widget/AdapterDataSetChangeWhileSmoothScrollTest.kt
+++ b/viewpager2/viewpager2/src/androidTest/java/androidx/viewpager2/widget/AdapterDataSetChangeWhileSmoothScrollTest.kt
@@ -35,7 +35,7 @@
import androidx.viewpager2.widget.ViewPager2.SCROLL_STATE_SETTLING
import org.hamcrest.CoreMatchers.equalTo
import org.hamcrest.Matchers.greaterThan
-import org.junit.Assert.assertThat
+import org.hamcrest.MatcherAssert.assertThat
import org.junit.Test
import org.junit.runner.RunWith
import org.junit.runners.Parameterized
diff --git a/viewpager2/viewpager2/src/androidTest/java/androidx/viewpager2/widget/AdapterTest.kt b/viewpager2/viewpager2/src/androidTest/java/androidx/viewpager2/widget/AdapterTest.kt
index cc0384d..45aca4c 100644
--- a/viewpager2/viewpager2/src/androidTest/java/androidx/viewpager2/widget/AdapterTest.kt
+++ b/viewpager2/viewpager2/src/androidTest/java/androidx/viewpager2/widget/AdapterTest.kt
@@ -28,7 +28,7 @@
import org.hamcrest.CoreMatchers.notNullValue
import org.hamcrest.CoreMatchers.nullValue
import org.hamcrest.Matchers.greaterThan
-import org.junit.Assert.assertThat
+import org.hamcrest.MatcherAssert.assertThat
import org.junit.Test
import org.junit.runner.RunWith
import java.util.concurrent.TimeUnit.SECONDS
diff --git a/viewpager2/viewpager2/src/androidTest/java/androidx/viewpager2/widget/BaseTest.kt b/viewpager2/viewpager2/src/androidTest/java/androidx/viewpager2/widget/BaseTest.kt
index c6668d7..6a7ce6a 100644
--- a/viewpager2/viewpager2/src/androidTest/java/androidx/viewpager2/widget/BaseTest.kt
+++ b/viewpager2/viewpager2/src/androidTest/java/androidx/viewpager2/widget/BaseTest.kt
@@ -69,7 +69,7 @@
import org.hamcrest.Matchers.lessThan
import org.hamcrest.Matchers.lessThanOrEqualTo
import org.junit.After
-import org.junit.Assert.assertThat
+import org.hamcrest.MatcherAssert.assertThat
import org.junit.Before
import org.junit.Rule
import java.util.concurrent.CountDownLatch
diff --git a/viewpager2/viewpager2/src/androidTest/java/androidx/viewpager2/widget/DisableUserInputTest.kt b/viewpager2/viewpager2/src/androidTest/java/androidx/viewpager2/widget/DisableUserInputTest.kt
index aae3469..1be5e31 100644
--- a/viewpager2/viewpager2/src/androidTest/java/androidx/viewpager2/widget/DisableUserInputTest.kt
+++ b/viewpager2/viewpager2/src/androidTest/java/androidx/viewpager2/widget/DisableUserInputTest.kt
@@ -29,7 +29,7 @@
import androidx.viewpager2.widget.ViewPager2.ORIENTATION_VERTICAL
import androidx.viewpager2.widget.swipe.ViewAdapter
import org.hamcrest.CoreMatchers.equalTo
-import org.junit.Assert.assertThat
+import org.hamcrest.MatcherAssert.assertThat
import org.junit.Test
import org.junit.runner.RunWith
import org.junit.runners.Parameterized
diff --git a/viewpager2/viewpager2/src/androidTest/java/androidx/viewpager2/widget/FakeDragTest.kt b/viewpager2/viewpager2/src/androidTest/java/androidx/viewpager2/widget/FakeDragTest.kt
index bd4b7fa..79e4f0d 100644
--- a/viewpager2/viewpager2/src/androidTest/java/androidx/viewpager2/widget/FakeDragTest.kt
+++ b/viewpager2/viewpager2/src/androidTest/java/androidx/viewpager2/widget/FakeDragTest.kt
@@ -40,7 +40,7 @@
import org.hamcrest.CoreMatchers.equalTo
import org.hamcrest.CoreMatchers.notNullValue
import org.hamcrest.Matchers.greaterThan
-import org.junit.Assert.assertThat
+import org.hamcrest.MatcherAssert.assertThat
import org.junit.Assume.assumeThat
import org.junit.Test
import org.junit.runner.RunWith
diff --git a/viewpager2/viewpager2/src/androidTest/java/androidx/viewpager2/widget/FragmentLifecycleTest.kt b/viewpager2/viewpager2/src/androidTest/java/androidx/viewpager2/widget/FragmentLifecycleTest.kt
index eabd8dc..2492604 100644
--- a/viewpager2/viewpager2/src/androidTest/java/androidx/viewpager2/widget/FragmentLifecycleTest.kt
+++ b/viewpager2/viewpager2/src/androidTest/java/androidx/viewpager2/widget/FragmentLifecycleTest.kt
@@ -23,7 +23,7 @@
import androidx.viewpager2.widget.ViewPager2.OFFSCREEN_PAGE_LIMIT_DEFAULT
import androidx.viewpager2.widget.ViewPager2.ORIENTATION_HORIZONTAL
import org.hamcrest.CoreMatchers.equalTo
-import org.junit.Assert.assertThat
+import org.hamcrest.MatcherAssert.assertThat
import org.junit.Test
import org.junit.runner.RunWith
import java.util.concurrent.CountDownLatch
diff --git a/viewpager2/viewpager2/src/androidTest/java/androidx/viewpager2/widget/HostFragmentBackStackTest.kt b/viewpager2/viewpager2/src/androidTest/java/androidx/viewpager2/widget/HostFragmentBackStackTest.kt
index b6162ff..8a57fd6 100644
--- a/viewpager2/viewpager2/src/androidTest/java/androidx/viewpager2/widget/HostFragmentBackStackTest.kt
+++ b/viewpager2/viewpager2/src/androidTest/java/androidx/viewpager2/widget/HostFragmentBackStackTest.kt
@@ -37,7 +37,7 @@
import androidx.viewpager2.widget.swipe.FragmentAdapter
import androidx.viewpager2.widget.swipe.PageFragment
import org.hamcrest.CoreMatchers.equalTo
-import org.junit.Assert.assertThat
+import org.hamcrest.MatcherAssert.assertThat
import org.junit.Test
import org.junit.runner.RunWith
import java.util.concurrent.TimeUnit.SECONDS
diff --git a/viewpager2/viewpager2/src/androidTest/java/androidx/viewpager2/widget/ItemDecorationTest.kt b/viewpager2/viewpager2/src/androidTest/java/androidx/viewpager2/widget/ItemDecorationTest.kt
index 644002e..ebfc7b0 100644
--- a/viewpager2/viewpager2/src/androidTest/java/androidx/viewpager2/widget/ItemDecorationTest.kt
+++ b/viewpager2/viewpager2/src/androidTest/java/androidx/viewpager2/widget/ItemDecorationTest.kt
@@ -26,7 +26,7 @@
import androidx.viewpager2.widget.ViewPager2.ORIENTATION_VERTICAL
import org.hamcrest.CoreMatchers.equalTo
import org.hamcrest.Matchers.greaterThan
-import org.junit.Assert.assertThat
+import org.hamcrest.MatcherAssert.assertThat
import org.junit.Assert.fail
import org.junit.Test
import org.junit.runner.RunWith
diff --git a/viewpager2/viewpager2/src/androidTest/java/androidx/viewpager2/widget/MutableCollectionsTest.kt b/viewpager2/viewpager2/src/androidTest/java/androidx/viewpager2/widget/MutableCollectionsTest.kt
index d29d4b4..9b6337b 100644
--- a/viewpager2/viewpager2/src/androidTest/java/androidx/viewpager2/widget/MutableCollectionsTest.kt
+++ b/viewpager2/viewpager2/src/androidTest/java/androidx/viewpager2/widget/MutableCollectionsTest.kt
@@ -30,7 +30,7 @@
import androidx.viewpager2.widget.swipe.PageView
import androidx.viewpager2.widget.swipe.SelfChecking
import org.hamcrest.Matchers.equalTo
-import org.junit.Assert.assertThat
+import org.hamcrest.MatcherAssert.assertThat
import org.junit.Test
import org.junit.runner.RunWith
import org.junit.runners.Parameterized
diff --git a/viewpager2/viewpager2/src/androidTest/java/androidx/viewpager2/widget/OffscreenPageLimitTest.kt b/viewpager2/viewpager2/src/androidTest/java/androidx/viewpager2/widget/OffscreenPageLimitTest.kt
index 8d89a7d..b4b3c85 100644
--- a/viewpager2/viewpager2/src/androidTest/java/androidx/viewpager2/widget/OffscreenPageLimitTest.kt
+++ b/viewpager2/viewpager2/src/androidTest/java/androidx/viewpager2/widget/OffscreenPageLimitTest.kt
@@ -34,7 +34,7 @@
import org.hamcrest.Matchers.greaterThanOrEqualTo
import org.hamcrest.Matchers.lessThan
import org.hamcrest.Matchers.lessThanOrEqualTo
-import org.junit.Assert.assertThat
+import org.hamcrest.MatcherAssert.assertThat
import org.junit.Test
import org.junit.runner.RunWith
import org.junit.runners.Parameterized
diff --git a/viewpager2/viewpager2/src/androidTest/java/androidx/viewpager2/widget/PaddingMarginDecorationTest.kt b/viewpager2/viewpager2/src/androidTest/java/androidx/viewpager2/widget/PaddingMarginDecorationTest.kt
index 7b5311c..40fb085 100644
--- a/viewpager2/viewpager2/src/androidTest/java/androidx/viewpager2/widget/PaddingMarginDecorationTest.kt
+++ b/viewpager2/viewpager2/src/androidTest/java/androidx/viewpager2/widget/PaddingMarginDecorationTest.kt
@@ -34,7 +34,7 @@
import androidx.viewpager2.widget.ViewPager2.SCROLL_STATE_SETTLING
import androidx.viewpager2.widget.swipe.ViewAdapter
import org.hamcrest.CoreMatchers.equalTo
-import org.junit.Assert.assertThat
+import org.hamcrest.MatcherAssert.assertThat
import org.junit.Test
import org.junit.runner.RunWith
import org.junit.runners.Parameterized
diff --git a/viewpager2/viewpager2/src/androidTest/java/androidx/viewpager2/widget/PageChangeCallbackTest.kt b/viewpager2/viewpager2/src/androidTest/java/androidx/viewpager2/widget/PageChangeCallbackTest.kt
index be88373..b18447e 100644
--- a/viewpager2/viewpager2/src/androidTest/java/androidx/viewpager2/widget/PageChangeCallbackTest.kt
+++ b/viewpager2/viewpager2/src/androidTest/java/androidx/viewpager2/widget/PageChangeCallbackTest.kt
@@ -45,7 +45,7 @@
import org.hamcrest.Matchers.allOf
import org.hamcrest.Matchers.greaterThan
import org.hamcrest.Matchers.greaterThanOrEqualTo
-import org.junit.Assert.assertThat
+import org.hamcrest.MatcherAssert.assertThat
import org.junit.Test
import org.junit.runner.RunWith
import org.junit.runners.Parameterized
diff --git a/viewpager2/viewpager2/src/androidTest/java/androidx/viewpager2/widget/PageFillTest.kt b/viewpager2/viewpager2/src/androidTest/java/androidx/viewpager2/widget/PageFillTest.kt
index 6f5d0c5..adeff10 100644
--- a/viewpager2/viewpager2/src/androidTest/java/androidx/viewpager2/widget/PageFillTest.kt
+++ b/viewpager2/viewpager2/src/androidTest/java/androidx/viewpager2/widget/PageFillTest.kt
@@ -26,7 +26,7 @@
import androidx.test.filters.LargeTest
import androidx.viewpager2.widget.ViewPager2.ORIENTATION_HORIZONTAL
import org.hamcrest.Matchers.containsString
-import org.junit.Assert.assertThat
+import org.hamcrest.MatcherAssert.assertThat
import org.junit.Assert.fail
import org.junit.Test
import org.junit.runner.RunWith
diff --git a/viewpager2/viewpager2/src/androidTest/java/androidx/viewpager2/widget/PageTransformerItemAnimatorTest.kt b/viewpager2/viewpager2/src/androidTest/java/androidx/viewpager2/widget/PageTransformerItemAnimatorTest.kt
index b0504d0..5e0c09d 100644
--- a/viewpager2/viewpager2/src/androidTest/java/androidx/viewpager2/widget/PageTransformerItemAnimatorTest.kt
+++ b/viewpager2/viewpager2/src/androidTest/java/androidx/viewpager2/widget/PageTransformerItemAnimatorTest.kt
@@ -27,7 +27,7 @@
import org.hamcrest.CoreMatchers.not
import org.hamcrest.CoreMatchers.notNullValue
import org.hamcrest.CoreMatchers.nullValue
-import org.junit.Assert.assertThat
+import org.hamcrest.MatcherAssert.assertThat
import org.junit.Test
import org.junit.runner.RunWith
diff --git a/viewpager2/viewpager2/src/androidTest/java/androidx/viewpager2/widget/PageTransformerTest.kt b/viewpager2/viewpager2/src/androidTest/java/androidx/viewpager2/widget/PageTransformerTest.kt
index dee4c31..5fbbc06 100644
--- a/viewpager2/viewpager2/src/androidTest/java/androidx/viewpager2/widget/PageTransformerTest.kt
+++ b/viewpager2/viewpager2/src/androidTest/java/androidx/viewpager2/widget/PageTransformerTest.kt
@@ -35,7 +35,7 @@
import org.hamcrest.Matchers.greaterThan
import org.hamcrest.Matchers.lessThan
import org.junit.Assert.assertFalse
-import org.junit.Assert.assertThat
+import org.hamcrest.MatcherAssert.assertThat
import org.junit.Assert.assertTrue
import org.junit.Test
import org.junit.runner.RunWith
diff --git a/viewpager2/viewpager2/src/androidTest/java/androidx/viewpager2/widget/SetItemWhileScrollInProgressTest.kt b/viewpager2/viewpager2/src/androidTest/java/androidx/viewpager2/widget/SetItemWhileScrollInProgressTest.kt
index b489cb4..49debd1 100644
--- a/viewpager2/viewpager2/src/androidTest/java/androidx/viewpager2/widget/SetItemWhileScrollInProgressTest.kt
+++ b/viewpager2/viewpager2/src/androidTest/java/androidx/viewpager2/widget/SetItemWhileScrollInProgressTest.kt
@@ -31,7 +31,7 @@
import org.hamcrest.CoreMatchers.instanceOf
import org.hamcrest.CoreMatchers.not
import org.hamcrest.CoreMatchers.nullValue
-import org.junit.Assert.assertThat
+import org.hamcrest.MatcherAssert.assertThat
import org.junit.Test
import org.junit.runner.RunWith
import org.junit.runners.Parameterized
diff --git a/viewpager2/viewpager2/src/androidTest/java/androidx/viewpager2/widget/swipe/FragmentAdapter.kt b/viewpager2/viewpager2/src/androidTest/java/androidx/viewpager2/widget/swipe/FragmentAdapter.kt
index 2a35e9b..6cfa14f 100644
--- a/viewpager2/viewpager2/src/androidTest/java/androidx/viewpager2/widget/swipe/FragmentAdapter.kt
+++ b/viewpager2/viewpager2/src/androidTest/java/androidx/viewpager2/widget/swipe/FragmentAdapter.kt
@@ -28,7 +28,7 @@
import org.hamcrest.Matchers.allOf
import org.hamcrest.Matchers.greaterThanOrEqualTo
import org.hamcrest.Matchers.lessThanOrEqualTo
-import org.junit.Assert.assertThat
+import org.hamcrest.MatcherAssert.assertThat
import java.util.concurrent.atomic.AtomicInteger
private const val ARG_KEY = "key"
diff --git a/wear/watchface/watchface-complications-data-core/build.gradle b/wear/watchface/watchface-complications-data-core/build.gradle
index e3fc7b0..61d63ff 100644
--- a/wear/watchface/watchface-complications-data-core/build.gradle
+++ b/wear/watchface/watchface-complications-data-core/build.gradle
@@ -41,7 +41,7 @@
testImplementation(libs.robolectric)
testImplementation(libs.mockitoCore)
testImplementation(libs.truth)
- testImplementation("junit:junit:4.13")
+ testImplementation(libs.junit)
}
android {
diff --git a/wear/watchface/watchface-complications-data-source-ktx/build.gradle b/wear/watchface/watchface-complications-data-source-ktx/build.gradle
index cb5bd1b..eb0075b 100644
--- a/wear/watchface/watchface-complications-data-source-ktx/build.gradle
+++ b/wear/watchface/watchface-complications-data-source-ktx/build.gradle
@@ -32,7 +32,7 @@
testImplementation(libs.testRules)
testImplementation(libs.robolectric)
testImplementation(libs.truth)
- testImplementation("junit:junit:4.13")
+ testImplementation(libs.junit)
}
android {
diff --git a/wear/watchface/watchface-complications-data-source/build.gradle b/wear/watchface/watchface-complications-data-source/build.gradle
index a8a91a5..3fdafcd 100644
--- a/wear/watchface/watchface-complications-data-source/build.gradle
+++ b/wear/watchface/watchface-complications-data-source/build.gradle
@@ -37,7 +37,7 @@
testImplementation(libs.robolectric)
testImplementation(libs.mockitoCore)
testImplementation(libs.truth)
- testImplementation("junit:junit:4.13")
+ testImplementation(libs.junit)
}
android {
diff --git a/wear/watchface/watchface-complications-data/build.gradle b/wear/watchface/watchface-complications-data/build.gradle
index 1266b0f..5219517 100644
--- a/wear/watchface/watchface-complications-data/build.gradle
+++ b/wear/watchface/watchface-complications-data/build.gradle
@@ -37,7 +37,7 @@
testImplementation(libs.robolectric)
testImplementation(libs.mockitoCore)
testImplementation(libs.truth)
- testImplementation("junit:junit:4.13")
+ testImplementation(libs.junit)
}
android {
diff --git a/wear/watchface/watchface-complications-rendering/build.gradle b/wear/watchface/watchface-complications-rendering/build.gradle
index 4d53861..e6033cf 100644
--- a/wear/watchface/watchface-complications-rendering/build.gradle
+++ b/wear/watchface/watchface-complications-rendering/build.gradle
@@ -43,7 +43,7 @@
testImplementation(libs.robolectric)
testImplementation(libs.mockitoCore)
testImplementation(libs.truth)
- testImplementation("junit:junit:4.13")
+ testImplementation(libs.junit)
testImplementation(project(":wear:watchface:watchface"))
}
diff --git a/wear/watchface/watchface-complications/build.gradle b/wear/watchface/watchface-complications/build.gradle
index 5f14252..3528cb3 100644
--- a/wear/watchface/watchface-complications/build.gradle
+++ b/wear/watchface/watchface-complications/build.gradle
@@ -38,7 +38,7 @@
testImplementation(libs.robolectric)
testImplementation(libs.mockitoCore)
testImplementation(libs.truth)
- testImplementation("junit:junit:4.13")
+ testImplementation(libs.junit)
testImplementation(libs.kotlinReflect)
androidTestImplementation(libs.testExtJunit)
diff --git a/wear/watchface/watchface-style/build.gradle b/wear/watchface/watchface-style/build.gradle
index 4b8ee65..e86aace 100644
--- a/wear/watchface/watchface-style/build.gradle
+++ b/wear/watchface/watchface-style/build.gradle
@@ -41,7 +41,7 @@
testImplementation(libs.robolectric)
testImplementation(libs.truth)
testImplementation(libs.kotlinTest)
- testImplementation("junit:junit:4.13")
+ testImplementation(libs.junit)
androidTestImplementation(libs.testExtJunit)
androidTestImplementation(libs.testCore)
diff --git a/wear/wear-phone-interactions/build.gradle b/wear/wear-phone-interactions/build.gradle
index 615334d..dfe98f3 100644
--- a/wear/wear-phone-interactions/build.gradle
+++ b/wear/wear-phone-interactions/build.gradle
@@ -31,7 +31,7 @@
api(libs.kotlinStdlib)
// Needed for Assert.assertThrows
- testImplementation("junit:junit:4.13")
+ testImplementation(libs.junit)
testImplementation(libs.testCore)
testImplementation(libs.testRunner)
testImplementation(libs.testRules)
diff --git a/wear/wear-remote-interactions/build.gradle b/wear/wear-remote-interactions/build.gradle
index e8ac65a..58c4b3a 100644
--- a/wear/wear-remote-interactions/build.gradle
+++ b/wear/wear-remote-interactions/build.gradle
@@ -35,10 +35,10 @@
androidTestImplementation(libs.testCore)
androidTestImplementation(libs.testRunner)
androidTestImplementation(libs.testRules)
- androidTestImplementation 'junit:junit:4.12'
+ androidTestImplementation(libs.junit)
// Needed for Assert.assertThrows
- testImplementation("junit:junit:4.13")
+ testImplementation(libs.junit)
testImplementation(libs.testCore)
testImplementation(libs.testRules)
testImplementation(libs.testRunner)
diff --git a/webkit/webkit/src/androidTest/java/androidx/webkit/WebSettingsCompatForceDarkTest.java b/webkit/webkit/src/androidTest/java/androidx/webkit/WebSettingsCompatForceDarkTest.java
index 732ca8c..facf895 100644
--- a/webkit/webkit/src/androidTest/java/androidx/webkit/WebSettingsCompatForceDarkTest.java
+++ b/webkit/webkit/src/androidTest/java/androidx/webkit/WebSettingsCompatForceDarkTest.java
@@ -16,10 +16,10 @@
package androidx.webkit;
+import static org.hamcrest.MatcherAssert.assertThat;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertThat;
import static org.junit.Assert.assertTrue;
import android.graphics.Bitmap;
diff --git a/work/work-gcm/src/androidTest/java/androidx/work/impl/background/gcm/GcmTaskConverterTest.kt b/work/work-gcm/src/androidTest/java/androidx/work/impl/background/gcm/GcmTaskConverterTest.kt
index 89a0e4d..308d551 100644
--- a/work/work-gcm/src/androidTest/java/androidx/work/impl/background/gcm/GcmTaskConverterTest.kt
+++ b/work/work-gcm/src/androidTest/java/androidx/work/impl/background/gcm/GcmTaskConverterTest.kt
@@ -29,7 +29,7 @@
import org.hamcrest.Matchers.greaterThan
import org.hamcrest.Matchers.lessThanOrEqualTo
import org.junit.Assert.assertEquals
-import org.junit.Assert.assertThat
+import org.hamcrest.MatcherAssert.assertThat
import org.junit.Before
import org.junit.Test
import org.junit.runner.RunWith
diff --git a/work/work-runtime/src/androidTest/java/androidx/work/RawWorkInfoDaoTest.kt b/work/work-runtime/src/androidTest/java/androidx/work/RawWorkInfoDaoTest.kt
index 38e9e5c..a321784 100644
--- a/work/work-runtime/src/androidTest/java/androidx/work/RawWorkInfoDaoTest.kt
+++ b/work/work-runtime/src/androidTest/java/androidx/work/RawWorkInfoDaoTest.kt
@@ -23,7 +23,7 @@
import androidx.work.worker.TestWorker
import org.hamcrest.CoreMatchers.`is`
import org.hamcrest.Matchers.containsInAnyOrder
-import org.junit.Assert.assertThat
+import org.hamcrest.MatcherAssert.assertThat
import org.junit.Test
import org.junit.runner.RunWith