Use Kotlinx coroutines 1.6.0

Relnote: updated :compose:ui:ui-test api (updateApi) due to test-coroutines-lib migration

This CL updates the tests with coroutines to align them with new APIs
https://github.com/Kotlin/kotlinx.coroutines/blob/1.6.0/kotlinx-coroutines-test/MIGRATION.md

Test: existing tests
Change-Id: I3366d5111b2fb830d619da5402c12ea4c929391a
diff --git a/navigation/navigation-dynamic-features-runtime/build.gradle b/navigation/navigation-dynamic-features-runtime/build.gradle
index b505bfb..347d0cf 100644
--- a/navigation/navigation-dynamic-features-runtime/build.gradle
+++ b/navigation/navigation-dynamic-features-runtime/build.gradle
@@ -15,6 +15,7 @@
  */
 
 import androidx.build.Publish
+import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
 
 plugins {
     id("AndroidXPlugin")
@@ -41,6 +42,7 @@
     testImplementation(libs.mockitoCore)
     testImplementation(libs.robolectric)
     testImplementation(libs.truth)
+    testImplementation(libs.kotlinCoroutinesTest)
 
     androidTestImplementation(libs.testCore)
     androidTestImplementation(libs.testExtJunit)
@@ -63,3 +65,9 @@
     inceptionYear = "2019"
     description = "Android Dynamic Feature Navigation Runtime"
 }
+
+tasks.withType(KotlinCompile).configureEach {
+    kotlinOptions {
+        freeCompilerArgs += "-opt-in=kotlin.RequiresOptIn"
+    }
+}
\ No newline at end of file