Merge "Update coroutines to 1.6.1" into androidx-main
diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml
index 53c4c95..39b93e1 100644
--- a/gradle/libs.versions.toml
+++ b/gradle/libs.versions.toml
@@ -27,13 +27,13 @@
 dagger = "2.40.1"
 dexmaker = "2.25.0"
 espresso = "3.3.0"
-guavaJre = "29.0-jre"
+guavaJre = "31.1-jre"
 hilt = "2.40.1"
 incap = "0.2"
 kotlin = "1.6.21"
 kotlinNative = "1.6.21"
 kotlinCompileTesting = "1.4.1"
-kotlinCoroutines = "1.6.0"
+kotlinCoroutines = "1.6.1"
 ksp = "1.6.21-1.0.5"
 ktlint = "0.43.0"
 leakcanary = "2.7"
@@ -100,7 +100,7 @@
 googleCompileTesting = { module = "com.google.testing.compile:compile-testing", version = "0.18" }
 gson = { module = "com.google.code.gson:gson", version = "2.9.0" }
 guava = { module = "com.google.guava:guava", version.ref = "guavaJre" }
-guavaAndroid = { module = "com.google.guava:guava", version = "29.0-android" }
+guavaAndroid = { module = "com.google.guava:guava", version = "31.1-android" }
 guavaListenableFuture = { module = "com.google.guava:listenablefuture", version = "1.0" }
 gradleIncapHelper = { module = "net.ltgt.gradle.incap:incap", version.ref = "incap" }
 gradleIncapHelperProcessor = { module = "net.ltgt.gradle.incap:incap-processor", version.ref = "incap" }
diff --git a/gradle/verification-metadata.xml b/gradle/verification-metadata.xml
index 57fdf5a..7d7b1a1 100644
--- a/gradle/verification-metadata.xml
+++ b/gradle/verification-metadata.xml
@@ -1113,6 +1113,11 @@
             <sha256 value="2185ed84d158e4c1881d9465a11a13721a289987a1da8d37df6825254ea95ecf" origin="Generated by Gradle because artifact wasn't signed"/>
          </artifact>
       </component>
+      <component group="org.jetbrains.kotlinx" name="kotlinx-coroutines-core" version="1.6.1">
+         <artifact name="kotlinx-coroutines-core-metadata-1.6.1-all.jar">
+            <sha256 value="67c807c236e19c32020fc5ba82b273fda1e76cad50693f0917efe6071f159db9" origin="Copied from module file. see: b/229661426"/>
+         </artifact>
+      </component>
       <component group="org.jetbrains.kotlinx" name="kotlinx-coroutines-core-metadata" version="1.4.1">
          <artifact name="kotlinx-coroutines-core-metadata-1.4.1-all.jar">
             <sha256 value="877057d99a7fff9282059ba6631a9039bf3b54795d397b7e69a67363b7d2dcfe" origin="Generated by Gradle because artifact wasn't signed"/>
@@ -1123,6 +1128,11 @@
             <sha256 value="d4c4022c8e083edb379ed920011e2d82d7539538582b91ead0b3cfc4072a53c3" origin="Generated by Gradle because artifact wasn't signed"/>
          </artifact>
       </component>
+      <component group="org.jetbrains.kotlinx" name="kotlinx-coroutines-test" version="1.6.1">
+         <artifact name="kotlinx-coroutines-test-metadata-1.6.1-all.jar">
+            <sha256 value="ca04c7ce03f7894de34d70ac173c4b0ecd32220db824ed1821727d207edc6c02" origin="Copied from module file. see: b/229661426"/>
+         </artifact>
+      </component>
       <component group="org.jetbrains.kotlinx" name="kotlinx-serialization-core-metadata" version="1.0.1">
          <artifact name="kotlinx-serialization-core-metadata-1.0.1-all.jar">
             <sha256 value="0201172838d77b1db848d738e88895cc83fe72f68de43ff928045c7c4c5d64c4" origin="Generated by Gradle because artifact wasn't signed"/>
diff --git a/paging/paging-rxjava2/src/main/java/androidx/paging/RxPagedListBuilder.kt b/paging/paging-rxjava2/src/main/java/androidx/paging/RxPagedListBuilder.kt
index 69cc178..e072860 100644
--- a/paging/paging-rxjava2/src/main/java/androidx/paging/RxPagedListBuilder.kt
+++ b/paging/paging-rxjava2/src/main/java/androidx/paging/RxPagedListBuilder.kt
@@ -31,7 +31,6 @@
 import kotlinx.coroutines.GlobalScope
 import kotlinx.coroutines.Job
 import kotlinx.coroutines.launch
-import kotlinx.coroutines.rx2.SchedulerCoroutineDispatcher
 import kotlinx.coroutines.rx2.asCoroutineDispatcher
 import kotlinx.coroutines.withContext
 
@@ -63,9 +62,9 @@
 
     @Suppress("DEPRECATION")
     private var boundaryCallback: PagedList.BoundaryCallback<Value>? = null
-    private var notifyDispatcher: SchedulerCoroutineDispatcher? = null
+    private var notifyDispatcher: CoroutineDispatcher? = null
     private var notifyScheduler: Scheduler? = null
-    private var fetchDispatcher: SchedulerCoroutineDispatcher? = null
+    private var fetchDispatcher: CoroutineDispatcher? = null
     private var fetchScheduler: Scheduler? = null
 
     /**
diff --git a/paging/paging-rxjava3/src/main/java/androidx/paging/rxjava3/RxPagedListBuilder.kt b/paging/paging-rxjava3/src/main/java/androidx/paging/rxjava3/RxPagedListBuilder.kt
index d720c98..d8b4d35 100644
--- a/paging/paging-rxjava3/src/main/java/androidx/paging/rxjava3/RxPagedListBuilder.kt
+++ b/paging/paging-rxjava3/src/main/java/androidx/paging/rxjava3/RxPagedListBuilder.kt
@@ -39,7 +39,6 @@
 import kotlinx.coroutines.GlobalScope
 import kotlinx.coroutines.Job
 import kotlinx.coroutines.launch
-import kotlinx.coroutines.rx3.SchedulerCoroutineDispatcher
 import kotlinx.coroutines.rx3.asCoroutineDispatcher
 import kotlinx.coroutines.withContext
 
@@ -71,9 +70,9 @@
 
     @Suppress("DEPRECATION")
     private var boundaryCallback: PagedList.BoundaryCallback<Value>? = null
-    private var notifyDispatcher: SchedulerCoroutineDispatcher? = null
+    private var notifyDispatcher: CoroutineDispatcher? = null
     private var notifyScheduler: Scheduler? = null
-    private var fetchDispatcher: SchedulerCoroutineDispatcher? = null
+    private var fetchDispatcher: CoroutineDispatcher? = null
     private var fetchScheduler: Scheduler? = null
 
     /**
diff --git a/room/room-paging-guava/build.gradle b/room/room-paging-guava/build.gradle
index 8f23959..2e69703 100644
--- a/room/room-paging-guava/build.gradle
+++ b/room/room-paging-guava/build.gradle
@@ -47,6 +47,7 @@
     androidTestImplementation(libs.kotlinTestJunit)
     androidTestImplementation(libs.kotlinCoroutinesTest)
     androidTestImplementation(libs.kotlinCoroutinesGuava)
+    androidTestImplementation(libs.guavaAndroid)
     androidTestImplementation("androidx.arch.core:core-testing:2.0.1")
     androidTestImplementation(project(":internal-testutils-common"))
     // depend on the shadowed version so that it tests with the shipped artifact