Upgrade to espresso 3.5.0-alpha06
Fixes compatibility with Android T.
Remove a couple usages of deprecated APIs
Add a workaround for https://github.com/android/android-test/issues/1352
Test: ./gradlew assembleAndroidTest --dry-run
Bug: 229302912
Change-Id: I32a80e5b7515ea9110bc507d9228852e0aec0edb
diff --git a/appcompat/appcompat-resources/build.gradle b/appcompat/appcompat-resources/build.gradle
index 54e7de4..db493d4 100644
--- a/appcompat/appcompat-resources/build.gradle
+++ b/appcompat/appcompat-resources/build.gradle
@@ -41,12 +41,14 @@
androidTestImplementation(project(":internal-testutils-runtime"), {
exclude group: "androidx.appcompat", module: "appcompat-resources"
})
+ androidTestImplementation(libs.multidex)
}
android {
defaultConfig {
// This disables the builds tools automatic vector -> PNG generation
generatedDensities = []
+ multiDexEnabled = true
}
aaptOptions {
diff --git a/compose/ui/ui-test-junit4/build.gradle b/compose/ui/ui-test-junit4/build.gradle
index 81f02a3..f372ac6 100644
--- a/compose/ui/ui-test-junit4/build.gradle
+++ b/compose/ui/ui-test-junit4/build.gradle
@@ -50,8 +50,8 @@
implementation("androidx.lifecycle:lifecycle-runtime:2.3.0")
implementation(libs.testCore)
implementation(libs.testMonitor)
- implementation(libs.espressoCore)
- implementation(libs.espressoIdlingResource)
+ implementation("androidx.test.espresso:espresso-core:3.3.0")
+ implementation("androidx.test.espresso:espresso-idling-resource:3.3.0")
implementation(libs.kotlinCoroutinesCore)
implementation(libs.kotlinCoroutinesTest)
@@ -108,8 +108,8 @@
implementation("androidx.lifecycle:lifecycle-runtime:2.3.0")
implementation(libs.testCore)
implementation(libs.testMonitor)
- implementation(libs.espressoCore)
- implementation(libs.espressoIdlingResource)
+ implementation("androidx.test.espresso:espresso-core:3.3.0")
+ implementation("androidx.test.espresso:espresso-idling-resource:3.3.0")
}
// TODO(b/214407011): These dependencies leak into instrumented tests as well. If you
diff --git a/compose/ui/ui-test/build.gradle b/compose/ui/ui-test/build.gradle
index f748b89..b14cbb3 100644
--- a/compose/ui/ui-test/build.gradle
+++ b/compose/ui/ui-test/build.gradle
@@ -56,7 +56,7 @@
implementation(project(":compose:ui:ui-util"))
implementation("androidx.annotation:annotation:1.1.0")
implementation("androidx.core:core-ktx:1.1.0")
- implementation(libs.espressoCore)
+ implementation("androidx.test.espresso:espresso-core:3.3.0")
implementation(libs.testMonitor)
testImplementation(project(":compose:test-utils"))
@@ -108,7 +108,7 @@
implementation("androidx.annotation:annotation:1.1.0")
implementation("androidx.core:core-ktx:1.1.0")
- implementation(libs.espressoCore)
+ implementation("androidx.test.espresso:espresso-core:3.3.0")
implementation(libs.testMonitor)
}
diff --git a/compose/ui/ui/build.gradle b/compose/ui/ui/build.gradle
index 25f4f872..1f8b5da 100644
--- a/compose/ui/ui/build.gradle
+++ b/compose/ui/ui/build.gradle
@@ -83,7 +83,7 @@
androidTestImplementation(libs.testUiautomator)
androidTestImplementation(libs.kotlinCoroutinesTest)
androidTestImplementation(libs.espressoCore)
- androidTestImplementation(libs.espressoContrib)
+ androidTestImplementation(libs.bundles.espressoContrib)
androidTestImplementation(libs.junit)
androidTestImplementation(libs.dexmakerMockito)
androidTestImplementation(libs.mockitoCore)
@@ -198,7 +198,7 @@
implementation(libs.testExtJunitKtx)
implementation(libs.kotlinCoroutinesTest)
implementation(libs.espressoCore)
- implementation(libs.espressoContrib)
+ implementation(libs.bundles.espressoContrib)
implementation(libs.junit)
implementation(libs.dexmakerMockito)
implementation(libs.mockitoCore)
diff --git a/coordinatorlayout/coordinatorlayout/build.gradle b/coordinatorlayout/coordinatorlayout/build.gradle
index d0a5f0b..6d441ee 100644
--- a/coordinatorlayout/coordinatorlayout/build.gradle
+++ b/coordinatorlayout/coordinatorlayout/build.gradle
@@ -16,12 +16,13 @@
androidTestImplementation(libs.testRunner)
androidTestImplementation(libs.testRules)
androidTestImplementation(libs.espressoCore, excludes.espresso)
- androidTestImplementation(libs.espressoContrib, excludes.espresso)
+ androidTestImplementation(libs.bundles.espressoContrib, excludes.espresso)
androidTestImplementation(libs.mockitoCore, excludes.bytebuddy)
androidTestImplementation(libs.dexmakerMockito, excludes.bytebuddy) // DexMaker has it"s own MockMaker
androidTestImplementation(project(":internal-testutils-runtime"), {
exclude group: "androidx.coordinatorlayout", module: "coordinatorlayout"
})
+ androidTestImplementation(libs.multidex)
}
android {
@@ -34,6 +35,9 @@
buildTypes.all {
consumerProguardFiles "proguard-rules.pro"
}
+ defaultConfig {
+ multiDexEnabled = true
+ }
namespace "androidx.coordinatorlayout"
}
diff --git a/dynamicanimation/dynamicanimation/src/androidTest/java/androidx/dynamicanimation/tests/FlingTests.java b/dynamicanimation/dynamicanimation/src/androidTest/java/androidx/dynamicanimation/tests/FlingTests.java
index 0933984..00d39a9 100644
--- a/dynamicanimation/dynamicanimation/src/androidTest/java/androidx/dynamicanimation/tests/FlingTests.java
+++ b/dynamicanimation/dynamicanimation/src/androidTest/java/androidx/dynamicanimation/tests/FlingTests.java
@@ -38,7 +38,6 @@
import org.junit.Before;
import org.junit.Rule;
import org.junit.Test;
-import org.junit.rules.ExpectedException;
import org.junit.runner.RunWith;
import org.mockito.internal.matchers.GreaterThan;
import org.mockito.internal.matchers.LessThan;
@@ -53,9 +52,6 @@
public View mView1;
public View mView2;
- @Rule
- public ExpectedException mExpectedException = ExpectedException.none();
-
@SuppressWarnings("deprecation")
public FlingTests() {
mActivityTestRule = new androidx.test.rule.ActivityTestRule<>(AnimationActivity.class);
diff --git a/dynamicanimation/dynamicanimation/src/androidTest/java/androidx/dynamicanimation/tests/SpringTests.java b/dynamicanimation/dynamicanimation/src/androidTest/java/androidx/dynamicanimation/tests/SpringTests.java
index ef00dbe..8548a1f 100644
--- a/dynamicanimation/dynamicanimation/src/androidTest/java/androidx/dynamicanimation/tests/SpringTests.java
+++ b/dynamicanimation/dynamicanimation/src/androidTest/java/androidx/dynamicanimation/tests/SpringTests.java
@@ -19,6 +19,7 @@
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertNull;
+import static org.junit.Assert.assertThrows;
import static org.junit.Assert.assertTrue;
import static org.junit.Assert.fail;
import static org.mockito.AdditionalMatchers.lt;
@@ -59,7 +60,6 @@
import org.junit.Before;
import org.junit.Rule;
import org.junit.Test;
-import org.junit.rules.ExpectedException;
import org.junit.runner.RunWith;
import java.util.concurrent.CountDownLatch;
@@ -74,16 +74,13 @@
public View mView1;
public View mView2;
- @Rule
- public ExpectedException mExpectedException = ExpectedException.none();
-
@SuppressWarnings("deprecation")
public SpringTests() {
mActivityTestRule = new androidx.test.rule.ActivityTestRule<>(AnimationActivity.class);
}
@Before
- public void setup() throws Exception {
+ public void setup() {
mView1 = mActivityTestRule.getActivity().findViewById(R.id.anim_view);
mView2 = mActivityTestRule.getActivity().findViewById(R.id.anim_another_view);
}
@@ -418,8 +415,7 @@
@Test
public void testInvalidStiffness() {
SpringForce spring = new SpringForce();
- mExpectedException.expect(IllegalArgumentException.class);
- spring.setStiffness(-5f);
+ assertThrows(IllegalArgumentException.class, () -> spring.setStiffness(-5f));
}
/**
@@ -428,8 +424,7 @@
@Test
public void testInvalidDampingRatio() {
SpringForce spring = new SpringForce();
- mExpectedException.expect(IllegalArgumentException.class);
- spring.setDampingRatio(-5f);
+ assertThrows(IllegalArgumentException.class, () -> spring.setDampingRatio(-5f));
}
/**
@@ -750,13 +745,14 @@
*/
@Test
public void testStartOnNonAnimationHandlerThread() throws InterruptedException {
- mExpectedException.expect(AndroidRuntimeException.class);
- SpringAnimation anim = new SpringAnimation(mView1, DynamicAnimation.ALPHA, 0f);
- InstrumentationRegistry.getInstrumentation().runOnMainSync(() -> {
- anim.setScheduler(anim.getScheduler());
- });
- runRunnableOnNewThread(() -> {
- anim.start();
+ assertThrows(AndroidRuntimeException.class, () -> {
+ SpringAnimation anim = new SpringAnimation(mView1, DynamicAnimation.ALPHA, 0f);
+ InstrumentationRegistry.getInstrumentation().runOnMainSync(() -> {
+ anim.setScheduler(anim.getScheduler());
+ });
+ runRunnableOnNewThread(() -> {
+ anim.start();
+ });
});
}
@@ -765,13 +761,14 @@
*/
@Test
public void testCancelOnNonAnimationHandlerThread() throws InterruptedException {
- mExpectedException.expect(AndroidRuntimeException.class);
- SpringAnimation anim = new SpringAnimation(mView1, DynamicAnimation.ALPHA, 0f);
- InstrumentationRegistry.getInstrumentation().runOnMainSync(() -> {
- anim.setScheduler(anim.getScheduler());
- });
- runRunnableOnNewThread(() -> {
- anim.cancel();
+ assertThrows(AndroidRuntimeException.class, () -> {
+ SpringAnimation anim = new SpringAnimation(mView1, DynamicAnimation.ALPHA, 0f);
+ InstrumentationRegistry.getInstrumentation().runOnMainSync(() -> {
+ anim.setScheduler(anim.getScheduler());
+ });
+ runRunnableOnNewThread(() -> {
+ anim.cancel();
+ });
});
}
@@ -779,14 +776,15 @@
* Test skipToEnd() on a test thread.
*/
@Test
- public void testSkipToEndOnNonAnimationHandlerThread() throws InterruptedException {
- mExpectedException.expect(AndroidRuntimeException.class);
- SpringAnimation anim = new SpringAnimation(mView1, DynamicAnimation.ALPHA, 0f);
- InstrumentationRegistry.getInstrumentation().runOnMainSync(() -> {
- anim.setScheduler(anim.getScheduler());
- });
- runRunnableOnNewThread(() -> {
- anim.skipToEnd();
+ public void testSkipToEndOnNonAnimationHandlerThread() {
+ assertThrows(AndroidRuntimeException.class, () -> {
+ SpringAnimation anim = new SpringAnimation(mView1, DynamicAnimation.ALPHA, 0f);
+ InstrumentationRegistry.getInstrumentation().runOnMainSync(() -> {
+ anim.setScheduler(anim.getScheduler());
+ });
+ runRunnableOnNewThread(() -> {
+ anim.skipToEnd();
+ });
});
}
diff --git a/emoji/emoji/src/androidTest/java/androidx/emoji/widget/EmojiEditTextTest.java b/emoji/emoji/src/androidTest/java/androidx/emoji/widget/EmojiEditTextTest.java
index a4d8db8..fdcee13 100644
--- a/emoji/emoji/src/androidTest/java/androidx/emoji/widget/EmojiEditTextTest.java
+++ b/emoji/emoji/src/androidTest/java/androidx/emoji/widget/EmojiEditTextTest.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.assertNull;
-import static org.junit.Assert.assertThat;
import android.app.Instrumentation;
@@ -71,12 +71,7 @@
assertEquals(5, editText.getMaxEmojiCount());
// set max emoji count
- mInstrumentation.runOnMainSync(new Runnable() {
- @Override
- public void run() {
- editText.setMaxEmojiCount(1);
- }
- });
+ mInstrumentation.runOnMainSync(() -> editText.setMaxEmojiCount(1));
mInstrumentation.waitForIdleSync();
assertEquals(1, editText.getMaxEmojiCount());
@@ -98,14 +93,11 @@
final EmojiEditText editText = activity.findViewById(R.id.editTextWithMaxCount);
// set max emoji count to 1 and set text with 2 emojis
- mInstrumentation.runOnMainSync(new Runnable() {
- @Override
- public void run() {
- editText.setMaxEmojiCount(1);
- final String string = new TestString(EMOJI_SINGLE_CODEPOINT).append(
- EMOJI_SINGLE_CODEPOINT).toString();
- editText.setText(string);
- }
+ mInstrumentation.runOnMainSync(() -> {
+ editText.setMaxEmojiCount(1);
+ final String string = new TestString(EMOJI_SINGLE_CODEPOINT).append(
+ EMOJI_SINGLE_CODEPOINT).toString();
+ editText.setText(string);
});
mInstrumentation.waitForIdleSync();
diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml
index 5de377d..c408a6e 100644
--- a/gradle/libs.versions.toml
+++ b/gradle/libs.versions.toml
@@ -26,7 +26,7 @@
cmake = "3.22.1"
dagger = "2.40.1"
dexmaker = "2.25.0"
-espresso = "3.3.0"
+espresso = "3.5.0-alpha06"
guavaJre = "31.1-jre"
hilt = "2.40.1"
incap = "0.2"
@@ -45,6 +45,7 @@
wire = "3.6.0"
[libraries]
+androidAccessibilityFramework = { module = "com.google.android.apps.common.testing.accessibility.framework:accessibility-test-framework", version = { strictly = "2.1" } }
androidBuilderModelMin = { module = "com.android.tools.build:builder-model", version.ref = "androidGradlePluginMin" }
androidGradlePluginz = { module = "com.android.tools.build:gradle", version.ref = "androidGradlePlugin" }
androidLint = { module = "com.android.tools.lint:lint", version.ref = "androidLint" }
@@ -77,7 +78,7 @@
dexMemberList = { module = "com.jakewharton.dex:dex-member-list", version = "4.1.1" }
dokkaGradlePluginz = { module = "org.jetbrains.dokka:dokka-android-gradle-plugin", version = "0.9.17-g014" }
dom4j = { module = "org.dom4j:dom4j", version = "2.1.3" }
-espressoContrib = { module = "androidx.test.espresso:espresso-contrib", version.ref = "espresso" }
+espressoContribInternal = { module = "androidx.test.espresso:espresso-contrib", version.ref = "espresso" }
espressoCore = { module = "androidx.test.espresso:espresso-core", version.ref = "espresso" }
espressoIdlingNet = { module = "androidx.test.espresso.idling:idling-net", version.ref = "espresso" }
espressoIdlingResource = { module = "androidx.test.espresso:espresso-idling-resource", version.ref = "espresso" }
@@ -191,3 +192,8 @@
kotlinJvm = { id = "org.jetbrains.kotlin.jvm", version.ref = "kotlin" }
kotlinMp = { id = "org.jetbrains.kotlin.multiplatform", version.ref = "kotlin" }
kotlinSerialization = { id = "org.jetbrains.kotlin.plugin.serialization", version.ref = "kotlin" }
+
+[bundles]
+# prevent androidAccessibilityFramework 3.1 which pulls hamcrest 2.2, breaking espresso-core
+# https://github.com/android/android-test/issues/1352
+espressoContrib = ["androidAccessibilityFramework", "espressoContribInternal"]
diff --git a/gradle/verification-keyring.keys b/gradle/verification-keyring.keys
index fd5130b..4208e68 100644
--- a/gradle/verification-keyring.keys
+++ b/gradle/verification-keyring.keys
@@ -8401,6 +8401,54 @@
-----END PGP PUBLIC KEY BLOCK-----
+pub BEDE11EAF1164480
+uid Joe Schmetzer <[email protected]>
+
+sub 4BE257B370130000
+-----BEGIN PGP PUBLIC KEY BLOCK-----
+Version: BCPG v1.68
+
+mQGNBFv1EEwBDAC61jyEM99KH18hI3zlfuqvGoNjTLIh0wge5vXAH8VxMR0ndOID
+HYSBT2+L6OeiqKlyhCgF1km48F/dMzyJdTASkNO1Ni+B2Ric1sBxjsSPufkjl4en
+yM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bipXzx3QvGwVYyP80JFn7CJluOl/u8vxi2EVFN6aV
+qdzwoswFE3+0W0AfbpHUUT4oeBW5OBTJ5i1Qb0DT6WXk3Y2j1Z08xxhY1RITnc2C
+33wjXAW0h+qq7/7Yq3w3/7ncv9sWIzU=
+=NtIH
+-----END PGP PUBLIC KEY BLOCK-----
+
+
pub BF984B4145EA13F7
sub 84761D363E7B0FC4
-----BEGIN PGP PUBLIC KEY BLOCK-----
@@ -10529,3 +10577,35 @@
C3w5t4+mmawdzZQGaBZyeHL6bx4uYnzzpaeuEKtwJWSOkOEApPQe
=Exzw
-----END PGP PUBLIC KEY BLOCK-----
+
+-----BEGIN PGP PUBLIC KEY BLOCK-----
+Comment: Hostname:
+Version: Hockeypuck ~unreleased
+
+xsBNBFRIQyEBCADYOc8Y4bOkLGh5NFwQ1JJwGzPY/mV9kndWy2tudEs89Poo4cQD
+A/wndJqO2PrdvDvt+kxKQGra0RzUNW3Te5gaePo7+3H297BAWar8+KiX8RRu3uB1
+Tbk2b5xmrncaD5R9TtRB8uNIzA0OG7N3+2rrwzplY3HNYlz9EeWwllUO5YFkniJp
+hOBjAbTGc2RjcuhueFse68NNCUUEzS+7pGWSpkwo5CsLyfbaCJUiSNIC06ygkY6R
+XCDZUFXI7jxfcReVMK+Wpoyk/RqY++xGmCf6MWJqkcKbn9G31fy0arHWnmaMNUUi
+rwGGzEVggMH+sbXKsLvRWr44fA/cKf+EbZ29ABEBAAHNHUppc2kgTGl1IDxsaXVq
+aXNpQGdvb2dsZS5jb20+wsB4BBMBAgAiBQJUSEMhAhsDBgsJCAcDAgYVCAIJCgsE
+FgIDAQIeAQIXgAAKCRDMY0byzjhy2UUPCADOIICATGIaZb2wnFpgXIq+3zOHutZW
+M+zmXXw5YUK6s5mRZycr90neciis8g31wTFa3832VHbJHEoLni8C1hERg4rvVrqU
+Q4y7iBEoGhKn/lgBCjImRfpYlhKtd5mmEXye2iz5EQ+VRHQWxOy3cG6TesBBpD9A
+Tya9BCSaUbc7UkGTRwhqNyX5+oeGwhoUrn4bOL+JQVATEMDskgAx0h3pIWMbhmZh
+XuKRVMxVgcPRbTFUiqDMl0uNUJwuFvvEorAGGVvEDh2Bws8CaY308b2EzF1tt9I1
+oOuqQh49JScg18aJU/h8n9x2lkzJhbobdmmvICQ+FClS4CpK5X89M8ddzsBNBFRI
+QyEBCADsdI8kpJKcdOgZjPwpp7xnWhaxWJ4JYVCB8Omr6ToEAaw3dWqkYfmTQwlO
+i2oBRKUnxgc+VBo/+mKOz18BIQUduM6kPjp/Hbas+uF0vKjbYKY/aLASRKR7drwp
+mphuZqibQr894HsVqXHJXwBN7/PUoAfsjVhcuZDtz+A1YJi+6D4I5kB4gBdk+fjh
+mqoapUhgDQ1RZPYzjko7UH7cMkQkHBCj1HmlPKU6MlZbvQn/p5lbIL7WuTuNI3jy
+jiWp0lLkblWgTyEY7MJvFH9s2bpPWjkxcx2+lBG2HAmXiOgRWmZSrrcX9+a2/Nb1
+5+2pMg/8ZI1bSw3lju5V/ozQ9pCRABEBAAHCwF8EGAECAAkFAlRIQyECGwwACgkQ
+zGNG8s44ctkKkQf9GAw6vtfuksg9BhVP1oyAqVwEDrQ7L5Bt1SB3iZbMcs455nY3
+YFD+0N4yPIIsYg+K0JaHr3PzHBaZjGFh3pD+tV7cuMXq/HkW+82Ogvn3onHWCfiG
+Yvl+ZBLlN9C52EGbIjx07vnjJoDXPHpeUeLEaKn3R7ijMP67/mfKYKUlZ/9uMRcJ
+Jt+HJXwaSaQgyGRDT37wmUCBUE9X0XaNKXYlZA7kn7jfpDBy/IaqcNOxe32yum/c
+4MpmcKGOFdm5Tr48TgdbDu75FT2tNsb/VtD6OFFaX7GjQB1CX64SCeuT9sDmqXsf
+uup3aw/ff+A7vCNFbhwiMUCJgH0aXV+A/bgZ3w==
+=Z8di
+-----END PGP PUBLIC KEY BLOCK-----
diff --git a/gradle/verification-metadata.xml b/gradle/verification-metadata.xml
index 42c0af4..37d8d78 100644
--- a/gradle/verification-metadata.xml
+++ b/gradle/verification-metadata.xml
@@ -13,6 +13,7 @@
<trust group="^com[.]android($|([.].*))" regex="true"/> <!-- b/215430394 -->
<trust group="com.google.testing.platform"/> <!-- b/215430394 -->
<trust group="com.google.android.gms"/> <!-- b/215442095 -->
+ <trust group="com.google.android.material"/> <!-- b/216192082 -->
<trust file=".*kotlin-native-prebuilt-macos-.*" regex="true"/> <!-- b/228184608 -->
</trusted-artifacts>
<trusted-keys>
@@ -345,6 +346,7 @@
<trusted-key id="bdb5fa4fe719d787fb3d3197f6d4a1d411e9d1ae" group="com.google.guava"/>
<trusted-key id="be096e29edb8d141" group="net.sf.proguard"/>
<trusted-key id="beabcfbee059e4e5" group="com.github.siom79.japicmp"/>
+ <trusted-key id="bede11eaf1164480" group="org.hamcrest"/>
<trusted-key id="bf984b4145ea13f7" group="com.squareup" name="javapoet"/>
<trusted-key id="bffc9b54721244ad" group="org.apache.commons"/>
<trusted-key id="c1b12a5d99c0729d" group="org.jetbrains"/>
@@ -366,6 +368,7 @@
<trusted-key id="cb3190ca7842439e57f3712e44ce7bf2825ea2cd" group="com.ibm.icu" name="icu4j"/>
<trusted-key id="cb43338e060cf9fa" group="org.jacoco"/>
<trusted-key id="cc4483cd6a3eb2939b948667a1b4460d8ba7b9af" group="org.mockito"/>
+ <trusted-key id="cc6346f2ce3872d9" group="com.google.protobuf"/>
<trusted-key id="cd5464315f0b98c77e6e8ecd9daadc1c9fcc82d0">
<trusting group="commons-cli" name="commons-cli"/>
<trusting group="org.apache.commons"/>
@@ -474,6 +477,22 @@
<sha256 value="cd6db17a11a31ede794ccbd1df0e4d9750f640234731f21cff885a9997277e81" origin="Generated by Gradle"/>
</artifact>
</component>
+ <component group="com.google.android.apps.common.testing.accessibility.framework" name="accessibility-test-framework" version="3.1.2">
+ <artifact name="accessibility-test-framework-3.1.2.pom">
+ <sha256 value="bc787098a208e6bdc8d93720a162bbea01df1b26394d1c1ef5ec523b1d604e8b" origin="Generated by Gradle"/>
+ </artifact>
+ <artifact name="accessibility-test-framework-3.1.2.aar">
+ <sha256 value="9b586dc8eeeb4f601038e23ef8ffd6a1deeca1163276d02797b0d2b8f9764b62" origin="Generated by Gradle"/>
+ </artifact>
+ </component>
+ <component group="com.google.android.apps.common.testing.accessibility.framework" name="accessibility-test-framework" version="2.1">
+ <artifact name="accessibility-test-framework-2.1.pom">
+ <sha256 value="d46777ad3ea8bca73491b2e02fc85b3664486abf5314cc4dc6740908bd855330" origin="Generated by Gradle"/>
+ </artifact>
+ <artifact name="accessibility-test-framework-2.1.jar">
+ <sha256 value="7b0aa6ed7553597ce0610684a9f7eca8021eee218f2e2f427c04a7fbf5f920bd" origin="Generated by Gradle"/>
+ </artifact>
+ </component>
<!-- Unsigned b/223907608 -->
<component group="com.google.android.datatransport" name="transport-api" version="2.2.1">
<artifact name="transport-api-2.2.1.aar">
@@ -523,35 +542,6 @@
</sha256>
</artifact>
</component>
- <!-- Unsigned b/216192082 -->
- <component group="com.google.android.material" name="material" version="1.0.0">
- <artifact name="material-1.0.0.aar">
- <sha256 value="7680e381a3c03798d999b2e441caadd8a56a0a808e108024a67af9fe26c11adc" origin="Generated by Gradle"/>
- </artifact>
- <artifact name="material-1.0.0.pom">
- <sha256 value="0155c01de3c444a30626018178e0461e2f76960d85b305ce1eed48e612a4d3dd" origin="Generated by Gradle">
- <also-trust value="c9fff541d51c11195de305c50bbfe4d1dfc97841983d95f6d7101112603515ab"/>
- </sha256>
- </artifact>
- </component>
- <!-- Unsigned b/216192082 -->
- <component group="com.google.android.material" name="material" version="1.2.1">
- <artifact name="material-1.2.1.aar">
- <sha256 value="d3d0cc776f2341da8e572586c7d390a5b356ce39a0deb2768071dc40b364ac80" origin="Generated by Gradle"/>
- </artifact>
- <artifact name="material-1.2.1.module">
- <sha256 value="3f9f7658e316772f1c28cfa84270f7fb89560da02212aeb35e4e4fa20a3ef7ed" origin="Generated by Gradle"/>
- </artifact>
- </component>
- <!-- Unsigned b/216192082 -->
- <component group="com.google.android.material" name="material" version="1.4.0-beta01">
- <artifact name="material-1.4.0-beta01.aar">
- <sha256 value="436332e688cf1182525b2d384857b98167b1dfc41347b8dc23905597df9b1711" origin="Generated by Gradle"/>
- </artifact>
- <artifact name="material-1.4.0-beta01.module">
- <sha256 value="d6a8c8f3e0e2544d53e3941a6e508c9a6397a75f3c4ed7a418360fad09d1557a" origin="Generated by Gradle"/>
- </artifact>
- </component>
<component group="com.google.android.odml" name="image" version="1.0.0-beta1">
<artifact name="image-1.0.0-beta1.aar">
<sha256 value="2e71aa31f83a9415277f119de67195726f07d1760e9542c111778c320e3aa1f2" origin="Generated by Gradle"/>
diff --git a/metrics/metrics-performance/build.gradle b/metrics/metrics-performance/build.gradle
index a673340..60e88d4 100644
--- a/metrics/metrics-performance/build.gradle
+++ b/metrics/metrics-performance/build.gradle
@@ -37,7 +37,7 @@
androidTestImplementation(libs.truth)
androidTestImplementation(libs.kotlinStdlib)
androidTestImplementation(libs.espressoCore, excludes.espresso)
- androidTestImplementation(libs.espressoContrib)
+ androidTestImplementation(libs.bundles.espressoContrib)
androidTestImplementation(project(':navigation:navigation-fragment-ktx'))
androidTestImplementation(project(':navigation:navigation-ui-ktx'))
androidTestImplementation(project(':appcompat:appcompat'))
diff --git a/metrics/metrics-performance/src/androidTest/java/androidx/metrics/performance/test/JankStatsTest.kt b/metrics/metrics-performance/src/androidTest/java/androidx/metrics/performance/test/JankStatsTest.kt
index c350dcf..349b8a2 100644
--- a/metrics/metrics-performance/src/androidTest/java/androidx/metrics/performance/test/JankStatsTest.kt
+++ b/metrics/metrics-performance/src/androidTest/java/androidx/metrics/performance/test/JankStatsTest.kt
@@ -37,10 +37,10 @@
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.asExecutor
import org.hamcrest.Matchers
+import org.hamcrest.MatcherAssert.assertThat
import org.junit.Assert.assertEquals
import org.junit.Assert.assertFalse
import org.junit.Assert.assertNotEquals
-import org.junit.Assert.assertThat
import org.junit.Assert.assertTrue
import org.junit.Before
import org.junit.Rule
diff --git a/swiperefreshlayout/swiperefreshlayout/build.gradle b/swiperefreshlayout/swiperefreshlayout/build.gradle
index 6c86792..c00acaf 100644
--- a/swiperefreshlayout/swiperefreshlayout/build.gradle
+++ b/swiperefreshlayout/swiperefreshlayout/build.gradle
@@ -16,7 +16,7 @@
androidTestImplementation(libs.testRunner)
androidTestImplementation(libs.testRules)
androidTestImplementation(libs.espressoCore, excludes.espresso)
- androidTestImplementation(libs.espressoContrib, excludes.espresso)
+ androidTestImplementation(libs.bundles.espressoContrib, excludes.espresso)
androidTestImplementation(libs.mockitoCore, excludes.bytebuddy) // DexMaker has it"s own MockMaker
androidTestImplementation(libs.dexmakerMockito, excludes.bytebuddy) // DexMaker has it"s own MockMaker
androidTestImplementation(project(":internal-testutils-espresso"))
@@ -26,6 +26,7 @@
androidTestImplementation(project(":recyclerview:recyclerview"), {
exclude group: "androidx.swiperefreshlayout", module: "swiperefreshlayout"
})
+ androidTestImplementation(libs.multidex)
}
androidx {
@@ -37,5 +38,8 @@
}
android {
+ defaultConfig {
+ multiDexEnabled = true
+ }
namespace "androidx.swiperefreshlayout"
}
diff --git a/vectordrawable/vectordrawable-seekable/src/androidTest/java/androidx/vectordrawable/graphics/drawable/tests/SeekableAnimatedVectorDrawableTest.java b/vectordrawable/vectordrawable-seekable/src/androidTest/java/androidx/vectordrawable/graphics/drawable/tests/SeekableAnimatedVectorDrawableTest.java
index 491298b..fb173e3 100644
--- a/vectordrawable/vectordrawable-seekable/src/androidTest/java/androidx/vectordrawable/graphics/drawable/tests/SeekableAnimatedVectorDrawableTest.java
+++ b/vectordrawable/vectordrawable-seekable/src/androidTest/java/androidx/vectordrawable/graphics/drawable/tests/SeekableAnimatedVectorDrawableTest.java
@@ -18,6 +18,7 @@
import static com.google.common.truth.Truth.assertThat;
+import static org.junit.Assert.assertThrows;
import static org.junit.Assert.fail;
import android.content.Context;
@@ -41,9 +42,7 @@
import androidx.vectordrawable.seekable.test.R;
import org.junit.ClassRule;
-import org.junit.Rule;
import org.junit.Test;
-import org.junit.rules.ExpectedException;
import org.junit.runner.RunWith;
import org.xmlpull.v1.XmlPullParser;
import org.xmlpull.v1.XmlPullParserException;
@@ -59,9 +58,6 @@
@ClassRule
public static AnimatorTestRule sAnimatorTestRule = new AnimatorTestRule();
- @Rule
- public ExpectedException expectedException = ExpectedException.none();
-
private static final float PIXEL_ERROR_THRESHOLD = 0.3f;
private static final float PIXEL_DIFF_THRESHOLD = 0.03f;
private static final float PIXEL_DIFF_COUNT_THRESHOLD = 0.1f;
@@ -277,11 +273,12 @@
@Test
@UiThreadTest
public void pathMorphing_exception() {
- expectedException.expect(InflateException.class);
- SeekableAnimatedVectorDrawable.create(
- ApplicationProvider.getApplicationContext(),
- R.drawable.animation_path_morphing_rect_exception
- );
+ assertThrows(InflateException.class, () -> {
+ SeekableAnimatedVectorDrawable.create(
+ ApplicationProvider.getApplicationContext(),
+ R.drawable.animation_path_morphing_rect_exception
+ );
+ });
}
@Test
diff --git a/viewpager2/viewpager2/src/androidTest/java/androidx/viewpager2/widget/BasicTest.java b/viewpager2/viewpager2/src/androidTest/java/androidx/viewpager2/widget/BasicTest.java
index 821ee87..e7d37a2 100644
--- a/viewpager2/viewpager2/src/androidTest/java/androidx/viewpager2/widget/BasicTest.java
+++ b/viewpager2/viewpager2/src/androidTest/java/androidx/viewpager2/widget/BasicTest.java
@@ -19,6 +19,7 @@
import static org.hamcrest.CoreMatchers.equalTo;
import static org.hamcrest.MatcherAssert.assertThat;
import static org.hamcrest.Matchers.arrayWithSize;
+import static org.junit.Assert.assertThrows;
import android.content.Context;
import android.os.Bundle;
@@ -32,9 +33,7 @@
import androidx.test.filters.MediumTest;
import androidx.viewpager2.test.R;
-import org.junit.Rule;
import org.junit.Test;
-import org.junit.rules.ExpectedException;
import org.junit.runner.RunWith;
import java.util.UUID;
@@ -42,17 +41,16 @@
@MediumTest
@RunWith(AndroidJUnit4.class)
public class BasicTest {
- @Rule
- public ExpectedException mExpectedException = ExpectedException.none();
-
@Test
public void test_childrenNotAllowed() {
- mExpectedException.expect(IllegalStateException.class);
- mExpectedException.expectMessage("ViewPager2 does not support direct child views");
+ assertThrows("ViewPager2 does not support direct child views",
+ IllegalStateException.class,
+ () -> {
+ Context context = ApplicationProvider.getApplicationContext();
+ ViewPager2 viewPager = new ViewPager2(context);
+ viewPager.addView(new View(context));
+ });
- Context context = ApplicationProvider.getApplicationContext();
- ViewPager2 viewPager = new ViewPager2(context);
- viewPager.addView(new View(context));
}
@Test
diff --git a/webkit/integration-tests/testapp/build.gradle b/webkit/integration-tests/testapp/build.gradle
index 151e8dd..2d2e298 100644
--- a/webkit/integration-tests/testapp/build.gradle
+++ b/webkit/integration-tests/testapp/build.gradle
@@ -36,7 +36,7 @@
androidTestImplementation(libs.testRunner)
androidTestImplementation(libs.testRules)
androidTestImplementation(libs.espressoCore, excludes.espresso)
- androidTestImplementation(libs.espressoContrib, excludes.espresso)
+ androidTestImplementation(libs.bundles.espressoContrib, excludes.espresso)
androidTestImplementation(libs.espressoIdlingResource)
androidTestImplementation(libs.espressoWeb, excludes.espresso)
androidTestImplementation(libs.mockitoCore, excludes.bytebuddy)
diff --git a/webkit/webkit/build.gradle b/webkit/webkit/build.gradle
index 6b6fd1e..61c4a73 100644
--- a/webkit/webkit/build.gradle
+++ b/webkit/webkit/build.gradle
@@ -34,9 +34,10 @@
androidTestImplementation("androidx.concurrent:concurrent-futures:1.0.0")
androidTestImplementation(libs.mockitoCore, excludes.bytebuddy) // DexMaker has it"s own MockMaker
androidTestImplementation(libs.dexmakerMockito, excludes.bytebuddy)
+ androidTestImplementation(libs.multidex)
// Hamcrest matchers:
- androidTestImplementation(libs.espressoContrib, excludes.espresso)
+ androidTestImplementation(libs.bundles.espressoContrib, excludes.espresso)
}
ext {
@@ -53,7 +54,9 @@
// Allow compiling the WebView support library boundary interfaces from this project.
main.java.srcDirs += new File(webviewBoundaryInterfacesDir, "src").getCanonicalPath()
}
-
+ defaultConfig {
+ multiDexEnabled = true
+ }
buildTypes.all {
consumerProguardFiles(
new File(webviewBoundaryInterfacesDir, "proguard.flags"),