Add tests of some JDK-21 pattern matching for switch

See https://openjdk.org/jeps/441.

Bug: b/336510513
Bug: b/335613935
Change-Id: I05675bbf2c5ade7db4dcb92738392acf3694fd6d
diff --git a/d8_r8/test_modules/tests_java_21/build.gradle.kts b/d8_r8/test_modules/tests_java_21/build.gradle.kts
index ecbcef1..afc55d0 100644
--- a/d8_r8/test_modules/tests_java_21/build.gradle.kts
+++ b/d8_r8/test_modules/tests_java_21/build.gradle.kts
@@ -3,7 +3,6 @@
 // BSD-style license that can be found in the LICENSE file.
 
 import org.gradle.api.JavaVersion
-import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
 
 plugins {
   `kotlin-dsl`
@@ -43,6 +42,8 @@
   }
 
   withType<Test> {
+    notCompatibleWithConfigurationCache(
+      "Failure storing the configuration cache: cannot serialize object of type 'org.gradle.api.internal.project.DefaultProject', a subtype of 'org.gradle.api.Project', as these are not supported with the configuration cache")
     TestingState.setUpTestingState(this)
     javaLauncher = getJavaLauncher(Jdk.JDK_21)
     systemProperty("TEST_DATA_LOCATION",