Opt-in Metalava w/ K2 UAST by default

Out of 414 modules that track APIs (1),
this commit makes 57 modules (~14%) (2)
opt out of Metalava with K2 UAST, mainly due to KMP support

(1): find . -name "current.txt" | wc -l
(2): git whatchanged -1 | grep "build.gradle" | wc -l

Bug: 271369023
Bug: 324624680
Test: ./gradlew checkApi
Change-Id: Ieeb8dafe1b1cda9c57a71860d405a091d3d2e2ca
diff --git a/buildSrc/private/src/main/kotlin/androidx/build/AndroidXExtension.kt b/buildSrc/private/src/main/kotlin/androidx/build/AndroidXExtension.kt
index b812f87..6b043c7 100644
--- a/buildSrc/private/src/main/kotlin/androidx/build/AndroidXExtension.kt
+++ b/buildSrc/private/src/main/kotlin/androidx/build/AndroidXExtension.kt
@@ -354,7 +354,7 @@
 
     var bypassCoordinateValidation = false
 
-    var metalavaK2UastEnabled = false
+    var metalavaK2UastEnabled = true
 
     val additionalDeviceTestApkKeys = mutableListOf<String>()
 
diff --git a/collection/collection/build.gradle b/collection/collection/build.gradle
index 6cda953..726b10a 100644
--- a/collection/collection/build.gradle
+++ b/collection/collection/build.gradle
@@ -133,4 +133,5 @@
     type = LibraryType.PUBLISHED_LIBRARY
     inceptionYear = "2018"
     description = "Standalone efficient collections."
+    metalavaK2UastEnabled = false
 }
diff --git a/compose/animation/animation-core/build.gradle b/compose/animation/animation-core/build.gradle
index ab55819..cb85b81 100644
--- a/compose/animation/animation-core/build.gradle
+++ b/compose/animation/animation-core/build.gradle
@@ -122,6 +122,7 @@
     type = LibraryType.PUBLISHED_LIBRARY_ONLY_USED_BY_KOTLIN_CONSUMERS
     inceptionYear = "2019"
     description = "Animation engine and animation primitives that are the building blocks of the Compose animation library"
+    metalavaK2UastEnabled = false
     samples(project(":compose:animation:animation-core:animation-core-samples"))
 }
 
diff --git a/compose/animation/animation-graphics/build.gradle b/compose/animation/animation-graphics/build.gradle
index 6026e74..e71848d 100644
--- a/compose/animation/animation-graphics/build.gradle
+++ b/compose/animation/animation-graphics/build.gradle
@@ -116,6 +116,7 @@
     type = LibraryType.PUBLISHED_LIBRARY_ONLY_USED_BY_KOTLIN_CONSUMERS
     inceptionYear = "2021"
     description = "Compose Animation Graphics Library for using animated-vector resources in Compose"
+    metalavaK2UastEnabled = false
     samples(project(":compose:animation:animation-graphics:animation-graphics-samples"))
 }
 
diff --git a/compose/animation/animation/build.gradle b/compose/animation/animation/build.gradle
index 977770d..8f75308 100644
--- a/compose/animation/animation/build.gradle
+++ b/compose/animation/animation/build.gradle
@@ -123,6 +123,7 @@
     type = LibraryType.PUBLISHED_LIBRARY_ONLY_USED_BY_KOTLIN_CONSUMERS
     inceptionYear = "2019"
     description = "Compose animation library"
+    metalavaK2UastEnabled = false
     samples(project(":compose:animation:animation:animation-samples"))
 }
 
diff --git a/compose/foundation/foundation-layout/build.gradle b/compose/foundation/foundation-layout/build.gradle
index cc742f9..035358a 100644
--- a/compose/foundation/foundation-layout/build.gradle
+++ b/compose/foundation/foundation-layout/build.gradle
@@ -115,6 +115,7 @@
     inceptionYear = "2019"
     description = "Compose layout implementations"
     legacyDisableKotlinStrictApiMode = true
+    metalavaK2UastEnabled = false
     samples(project(":compose:foundation:foundation-layout:foundation-layout-samples"))
 }
 
diff --git a/compose/foundation/foundation/build.gradle b/compose/foundation/foundation/build.gradle
index 7a84faa..fb4d0ad 100644
--- a/compose/foundation/foundation/build.gradle
+++ b/compose/foundation/foundation/build.gradle
@@ -151,5 +151,6 @@
     inceptionYear = "2018"
     description = "Higher level abstractions of the Compose UI primitives. This library is design system agnostic, providing the high-level building blocks for both application and design-system developers"
     legacyDisableKotlinStrictApiMode = true
+    metalavaK2UastEnabled = false
     samples(project(":compose:foundation:foundation:foundation-samples"))
 }
diff --git a/compose/material/material-ripple/build.gradle b/compose/material/material-ripple/build.gradle
index 2fa1de4..417619c 100644
--- a/compose/material/material-ripple/build.gradle
+++ b/compose/material/material-ripple/build.gradle
@@ -110,6 +110,7 @@
     inceptionYear = "2020"
     description = "Material ripple used to build interactive components"
     legacyDisableKotlinStrictApiMode = true
+    metalavaK2UastEnabled = false
 }
 
 android {
diff --git a/compose/material/material/build.gradle b/compose/material/material/build.gradle
index 724fa3f..26a7804 100644
--- a/compose/material/material/build.gradle
+++ b/compose/material/material/build.gradle
@@ -137,6 +137,7 @@
     inceptionYear = "2018"
     description = "Compose Material Design Components library"
     legacyDisableKotlinStrictApiMode = true
+    metalavaK2UastEnabled = false
     samples(project(":compose:material:material:material-samples"))
 }
 
diff --git a/compose/material3/adaptive/adaptive-layout/build.gradle b/compose/material3/adaptive/adaptive-layout/build.gradle
index 9654c84..dbf4fa5 100644
--- a/compose/material3/adaptive/adaptive-layout/build.gradle
+++ b/compose/material3/adaptive/adaptive-layout/build.gradle
@@ -107,6 +107,7 @@
     inceptionYear = "2023"
     description = "Compose Material Design Adaptive Library"
     legacyDisableKotlinStrictApiMode = true
+    metalavaK2UastEnabled = false
     samples(project(":compose:material3:adaptive:adaptive-samples"))
 }
 
diff --git a/compose/material3/adaptive/adaptive-navigation/build.gradle b/compose/material3/adaptive/adaptive-navigation/build.gradle
index 001bd0a..944635d 100644
--- a/compose/material3/adaptive/adaptive-navigation/build.gradle
+++ b/compose/material3/adaptive/adaptive-navigation/build.gradle
@@ -106,6 +106,7 @@
     inceptionYear = "2023"
     description = "Compose Material Design Adaptive Library"
     legacyDisableKotlinStrictApiMode = true
+    metalavaK2UastEnabled = false
 }
 
 tasks.withType(KotlinCompile).configureEach {
diff --git a/compose/material3/adaptive/adaptive/build.gradle b/compose/material3/adaptive/adaptive/build.gradle
index ecc8e46..0c286c4 100644
--- a/compose/material3/adaptive/adaptive/build.gradle
+++ b/compose/material3/adaptive/adaptive/build.gradle
@@ -106,6 +106,7 @@
     inceptionYear = "2023"
     description = "Compose Material Design Adaptive Library"
     legacyDisableKotlinStrictApiMode = true
+    metalavaK2UastEnabled = false
 }
 
 tasks.withType(KotlinCompile).configureEach {
diff --git a/compose/material3/material3-adaptive-navigation-suite/build.gradle b/compose/material3/material3-adaptive-navigation-suite/build.gradle
index 1f731d6..2173900 100644
--- a/compose/material3/material3-adaptive-navigation-suite/build.gradle
+++ b/compose/material3/material3-adaptive-navigation-suite/build.gradle
@@ -106,5 +106,6 @@
     inceptionYear = "2023"
     description = "Compose Material Design Adaptive Navigation Suite Library"
     legacyDisableKotlinStrictApiMode = true
+    metalavaK2UastEnabled = false
     samples(project(":compose:material3:material3-adaptive-navigation-suite:material3-adaptive-navigation-suite-samples"))
 }
diff --git a/compose/material3/material3-common/build.gradle b/compose/material3/material3-common/build.gradle
index 13b52b2..9224291 100644
--- a/compose/material3/material3-common/build.gradle
+++ b/compose/material3/material3-common/build.gradle
@@ -111,5 +111,6 @@
             "components that can be shared between different Material libraries or used by app" +
             " developers. It builds upon the Jetpack Compose libraries."
     legacyDisableKotlinStrictApiMode = true
+    metalavaK2UastEnabled = false
     samples(project(":compose:material3:material3-common:material3-common-samples"))
 }
diff --git a/compose/material3/material3-window-size-class/build.gradle b/compose/material3/material3-window-size-class/build.gradle
index f31ae70..92988f3 100644
--- a/compose/material3/material3-window-size-class/build.gradle
+++ b/compose/material3/material3-window-size-class/build.gradle
@@ -107,6 +107,7 @@
     inceptionYear = "2022"
     description = "Provides window size classes for building responsive UIs"
     legacyDisableKotlinStrictApiMode = true
+    metalavaK2UastEnabled = false
     samples(project(":compose:material3:material3-window-size-class:material3-window-size-class-samples"))
 }
 
diff --git a/compose/material3/material3/build.gradle b/compose/material3/material3/build.gradle
index 1d4ba66..266632e 100644
--- a/compose/material3/material3/build.gradle
+++ b/compose/material3/material3/build.gradle
@@ -131,6 +131,7 @@
     inceptionYear = "2021"
     description = "Compose Material You Design Components library"
     legacyDisableKotlinStrictApiMode = true
+    metalavaK2UastEnabled = false
     samples(project(":compose:material3:material3:material3-samples"))
 }
 
diff --git a/compose/runtime/runtime-saveable/build.gradle b/compose/runtime/runtime-saveable/build.gradle
index 8250562..973b25b 100644
--- a/compose/runtime/runtime-saveable/build.gradle
+++ b/compose/runtime/runtime-saveable/build.gradle
@@ -110,6 +110,7 @@
     inceptionYear = "2020"
     description = "Compose components that allow saving and restoring the local ui state"
     legacyDisableKotlinStrictApiMode = true
+    metalavaK2UastEnabled = false
     samples(project(":compose:runtime:runtime-saveable:runtime-saveable-samples"))
 }
 
diff --git a/compose/runtime/runtime/build.gradle b/compose/runtime/runtime/build.gradle
index cf49965..a82f5ac 100644
--- a/compose/runtime/runtime/build.gradle
+++ b/compose/runtime/runtime/build.gradle
@@ -147,5 +147,6 @@
     inceptionYear = "2019"
     description = "Tree composition support for code generated by the Compose compiler plugin and corresponding public API"
     legacyDisableKotlinStrictApiMode = true
+    metalavaK2UastEnabled = false
     samples(project(":compose:runtime:runtime:runtime-samples"))
 }
diff --git a/compose/ui/ui-geometry/build.gradle b/compose/ui/ui-geometry/build.gradle
index 49a573a..a73958c 100644
--- a/compose/ui/ui-geometry/build.gradle
+++ b/compose/ui/ui-geometry/build.gradle
@@ -97,6 +97,7 @@
     inceptionYear = "2020"
     description = "Compose classes related to dimensions without units"
     legacyDisableKotlinStrictApiMode = true
+    metalavaK2UastEnabled = false
 }
 
 android {
diff --git a/compose/ui/ui-graphics/build.gradle b/compose/ui/ui-graphics/build.gradle
index 202ab22..146aa0a 100644
--- a/compose/ui/ui-graphics/build.gradle
+++ b/compose/ui/ui-graphics/build.gradle
@@ -115,6 +115,7 @@
     inceptionYear = "2020"
     description = "Compose graphics"
     legacyDisableKotlinStrictApiMode = true
+    metalavaK2UastEnabled = false
     samples(project(":compose:ui:ui-graphics:ui-graphics-samples"))
 }
 
diff --git a/compose/ui/ui-test-junit4/build.gradle b/compose/ui/ui-test-junit4/build.gradle
index 46b766d..c757359 100644
--- a/compose/ui/ui-test-junit4/build.gradle
+++ b/compose/ui/ui-test-junit4/build.gradle
@@ -125,4 +125,5 @@
     inceptionYear = "2020"
     description = "Compose testing integration with JUnit4"
     legacyDisableKotlinStrictApiMode = true
+    metalavaK2UastEnabled = false
 }
diff --git a/compose/ui/ui-test/build.gradle b/compose/ui/ui-test/build.gradle
index e5c600c..6a3bce0 100644
--- a/compose/ui/ui-test/build.gradle
+++ b/compose/ui/ui-test/build.gradle
@@ -155,5 +155,6 @@
     inceptionYear = "2019"
     description = "Compose testing library"
     legacyDisableKotlinStrictApiMode = true
+    metalavaK2UastEnabled = false
     samples(project(":compose:ui:ui-test:ui-test-samples"))
 }
diff --git a/compose/ui/ui-text/build.gradle b/compose/ui/ui-text/build.gradle
index 47192fb..24b0f50 100644
--- a/compose/ui/ui-text/build.gradle
+++ b/compose/ui/ui-text/build.gradle
@@ -141,6 +141,7 @@
     inceptionYear = "2019"
     description = "Compose Text primitives and utilities"
     legacyDisableKotlinStrictApiMode = true
+    metalavaK2UastEnabled = false
     samples(project(":compose:ui:ui-text:ui-text-samples"))
 }
 
diff --git a/compose/ui/ui-tooling-preview/build.gradle b/compose/ui/ui-tooling-preview/build.gradle
index c525563..781e58a 100644
--- a/compose/ui/ui-tooling-preview/build.gradle
+++ b/compose/ui/ui-tooling-preview/build.gradle
@@ -90,6 +90,7 @@
     description = "Compose tooling library API. This library provides the API required to declare" +
             " @Preview composables in user apps."
     legacyDisableKotlinStrictApiMode = true
+    metalavaK2UastEnabled = false
 }
 
 android {
diff --git a/compose/ui/ui-unit/build.gradle b/compose/ui/ui-unit/build.gradle
index 7f470db..33751f8 100644
--- a/compose/ui/ui-unit/build.gradle
+++ b/compose/ui/ui-unit/build.gradle
@@ -110,6 +110,7 @@
     inceptionYear = "2020"
     description = "Compose classes for simple units"
     legacyDisableKotlinStrictApiMode = true
+    metalavaK2UastEnabled = false
     samples(project(":compose:ui:ui-unit:ui-unit-samples"))
 }
 
diff --git a/compose/ui/ui-util/build.gradle b/compose/ui/ui-util/build.gradle
index 1abb92c..9ea3f32 100644
--- a/compose/ui/ui-util/build.gradle
+++ b/compose/ui/ui-util/build.gradle
@@ -97,6 +97,7 @@
     inceptionYear = "2020"
     description = "Internal Compose utilities used by other modules"
     legacyDisableKotlinStrictApiMode = true
+    metalavaK2UastEnabled = false
 }
 
 androidxCompose {
diff --git a/compose/ui/ui/build.gradle b/compose/ui/ui/build.gradle
index 5d583a5..db3f0ac 100644
--- a/compose/ui/ui/build.gradle
+++ b/compose/ui/ui/build.gradle
@@ -205,6 +205,7 @@
     inceptionYear = "2019"
     description = "Compose UI primitives. This library contains the primitives that form the Compose UI Toolkit, such as drawing, measurement and layout."
     legacyDisableKotlinStrictApiMode = true
+    metalavaK2UastEnabled = false
     samples(project(":compose:ui:ui:ui-samples"))
 }
 
diff --git a/constraintlayout/constraintlayout-compose/build.gradle b/constraintlayout/constraintlayout-compose/build.gradle
index f6ed5a1..39c7ece 100644
--- a/constraintlayout/constraintlayout-compose/build.gradle
+++ b/constraintlayout/constraintlayout-compose/build.gradle
@@ -110,6 +110,7 @@
     inceptionYear = "2022"
     description = "This library offers a flexible and adaptable way to position and animate widgets in Compose"
     legacyDisableKotlinStrictApiMode = true
+    metalavaK2UastEnabled = false
     samples(project(":constraintlayout:constraintlayout-compose:constraintlayout-compose-samples"))
 }
 
diff --git a/datastore/datastore-core-okio/build.gradle b/datastore/datastore-core-okio/build.gradle
index d6ecd2e..dc55a3d 100644
--- a/datastore/datastore-core-okio/build.gradle
+++ b/datastore/datastore-core-okio/build.gradle
@@ -99,4 +99,5 @@
     type = LibraryType.PUBLISHED_LIBRARY
     inceptionYear = "2020"
     description = "Android DataStore Core Okio- contains APIs to use datastore-core in multiplatform via okio"
+    metalavaK2UastEnabled = false
 }
diff --git a/datastore/datastore-core/build.gradle b/datastore/datastore-core/build.gradle
index 46bb497..0a0a304 100644
--- a/datastore/datastore-core/build.gradle
+++ b/datastore/datastore-core/build.gradle
@@ -176,4 +176,5 @@
     inceptionYear = "2020"
     description = "Android DataStore Core - contains the underlying store used by each serialization method"
     legacyDisableKotlinStrictApiMode = true
+    metalavaK2UastEnabled = false
 }
diff --git a/datastore/datastore-preferences-core/build.gradle b/datastore/datastore-preferences-core/build.gradle
index 7f7946b..94c61c8 100644
--- a/datastore/datastore-preferences-core/build.gradle
+++ b/datastore/datastore-preferences-core/build.gradle
@@ -115,4 +115,5 @@
     inceptionYear = "2020"
     description = "Android Preferences DataStore without the Android Dependencies"
     legacyDisableKotlinStrictApiMode = true
+    metalavaK2UastEnabled = false
 }
diff --git a/glance/glance-appwidget/build.gradle b/glance/glance-appwidget/build.gradle
index b3e4640..28ca748 100644
--- a/glance/glance-appwidget/build.gradle
+++ b/glance/glance-appwidget/build.gradle
@@ -113,6 +113,7 @@
     description = "Glance-appwidgets allows developers to build layouts for Android AppWidgets " +
             "using a Jetpack Compose-style API."
     legacyDisableKotlinStrictApiMode = true
+    metalavaK2UastEnabled = false
     samples(projectOrArtifact(":glance:glance-appwidget:glance-appwidget-samples"))
 }
 
diff --git a/glance/glance-template/build.gradle b/glance/glance-template/build.gradle
index 0db72c3..636f22a 100644
--- a/glance/glance-template/build.gradle
+++ b/glance/glance-template/build.gradle
@@ -85,4 +85,5 @@
     description = "Glance allows developers to build layouts for remote surfaces using a Jetpack " +
             "Compose-style API."
     legacyDisableKotlinStrictApiMode = true
+    metalavaK2UastEnabled = false
 }
diff --git a/glance/glance-wear-tiles/build.gradle b/glance/glance-wear-tiles/build.gradle
index ed1d830..6a4bc14 100644
--- a/glance/glance-wear-tiles/build.gradle
+++ b/glance/glance-wear-tiles/build.gradle
@@ -99,4 +99,5 @@
     description = "Glance allows developers to build layouts for Wear Tiles using a Jetpack " +
             "Compose-style API."
     legacyDisableKotlinStrictApiMode = true
+    metalavaK2UastEnabled = false
 }
diff --git a/glance/glance/build.gradle b/glance/glance/build.gradle
index fff0bbb..1a10084 100644
--- a/glance/glance/build.gradle
+++ b/glance/glance/build.gradle
@@ -99,4 +99,5 @@
     description = "Glance allows developers to build layouts for remote surfaces using a Jetpack " +
             "Compose-style API."
     legacyDisableKotlinStrictApiMode = true
+    metalavaK2UastEnabled = false
 }
diff --git a/graphics/graphics-shapes/build.gradle b/graphics/graphics-shapes/build.gradle
index 307d1fa..7212f00 100644
--- a/graphics/graphics-shapes/build.gradle
+++ b/graphics/graphics-shapes/build.gradle
@@ -110,4 +110,5 @@
     inceptionYear = "2022"
     description = "create and render rounded polygonal shapes"
     legacyDisableKotlinStrictApiMode = true
+    metalavaK2UastEnabled = false
 }
diff --git a/health/connect/connect-testing/build.gradle b/health/connect/connect-testing/build.gradle
index 57c2591..d234ea3 100644
--- a/health/connect/connect-testing/build.gradle
+++ b/health/connect/connect-testing/build.gradle
@@ -57,6 +57,7 @@
     type = LibraryType.PUBLISHED_TEST_LIBRARY
     inceptionYear = "2024"
     description = "Test utils for Health Connect. This library should be added as a test dependency when writing unit tests that call HealthConnect APIs."
+    metalavaK2UastEnabled = false
 }
 
 tasks.withType(KotlinCompile).configureEach {
diff --git a/ink/ink-brush/build.gradle b/ink/ink-brush/build.gradle
index 9a6f0d9..8f0e941 100644
--- a/ink/ink-brush/build.gradle
+++ b/ink/ink-brush/build.gradle
@@ -80,4 +80,5 @@
     type = LibraryType.PUBLISHED_LIBRARY
     inceptionYear = "2024"
     description = "Define brushes for freehand input."
+    metalavaK2UastEnabled = false
 }
diff --git a/kruth/kruth/build.gradle b/kruth/kruth/build.gradle
index b62f9f8..12da8f8 100644
--- a/kruth/kruth/build.gradle
+++ b/kruth/kruth/build.gradle
@@ -106,4 +106,5 @@
     runApiTasks = new RunApiTasks.Yes() // Used to diff against Google Truth
     type = LibraryType.INTERNAL_TEST_LIBRARY
     doNotDocumentReason = "Not shipped externally"
+    metalavaK2UastEnabled = false
 }
diff --git a/lifecycle/lifecycle-common/build.gradle b/lifecycle/lifecycle-common/build.gradle
index 71d39fc..30cdeb4 100644
--- a/lifecycle/lifecycle-common/build.gradle
+++ b/lifecycle/lifecycle-common/build.gradle
@@ -85,4 +85,5 @@
     type = LibraryType.PUBLISHED_LIBRARY
     inceptionYear = "2017"
     description = "Android Lifecycle-Common"
+    metalavaK2UastEnabled = false
 }
diff --git a/lifecycle/lifecycle-runtime-compose/build.gradle b/lifecycle/lifecycle-runtime-compose/build.gradle
index 80ec967..977da34 100644
--- a/lifecycle/lifecycle-runtime-compose/build.gradle
+++ b/lifecycle/lifecycle-runtime-compose/build.gradle
@@ -76,6 +76,7 @@
     inceptionYear = "2021"
     description = "Compose integration with Lifecycle"
     legacyDisableKotlinStrictApiMode = true
+    metalavaK2UastEnabled = false
     samples(project(":lifecycle:lifecycle-runtime-compose:lifecycle-runtime-compose-samples"))
 }
 
diff --git a/lifecycle/lifecycle-runtime-testing/build.gradle b/lifecycle/lifecycle-runtime-testing/build.gradle
index fb37804..430b902 100644
--- a/lifecycle/lifecycle-runtime-testing/build.gradle
+++ b/lifecycle/lifecycle-runtime-testing/build.gradle
@@ -77,6 +77,7 @@
     inceptionYear = "2019"
     description = "Testing utilities for 'lifecycle' artifact"
     legacyDisableKotlinStrictApiMode = true
+    metalavaK2UastEnabled = false
 }
 
 android {
diff --git a/lifecycle/lifecycle-runtime/build.gradle b/lifecycle/lifecycle-runtime/build.gradle
index e1682b6..7b0d13f 100644
--- a/lifecycle/lifecycle-runtime/build.gradle
+++ b/lifecycle/lifecycle-runtime/build.gradle
@@ -148,4 +148,5 @@
     type = LibraryType.PUBLISHED_LIBRARY
     inceptionYear "2017"
     description "Android Lifecycle Runtime"
+    metalavaK2UastEnabled = false
 }
diff --git a/lifecycle/lifecycle-viewmodel-compose/build.gradle b/lifecycle/lifecycle-viewmodel-compose/build.gradle
index db0b559..1167792 100644
--- a/lifecycle/lifecycle-viewmodel-compose/build.gradle
+++ b/lifecycle/lifecycle-viewmodel-compose/build.gradle
@@ -95,6 +95,7 @@
     inceptionYear = "2021"
     description = "Compose integration with Lifecycle ViewModel"
     legacyDisableKotlinStrictApiMode = true
+    metalavaK2UastEnabled = false
     samples(projectOrArtifact(":lifecycle:lifecycle-viewmodel-compose:lifecycle-viewmodel-compose-samples"))
 }
 
diff --git a/lifecycle/lifecycle-viewmodel-testing/build.gradle b/lifecycle/lifecycle-viewmodel-testing/build.gradle
index d56e621..958dcae 100644
--- a/lifecycle/lifecycle-viewmodel-testing/build.gradle
+++ b/lifecycle/lifecycle-viewmodel-testing/build.gradle
@@ -106,7 +106,7 @@
     inceptionYear = "2024"
     description = "Testing utilities for 'lifecycle-viewmodel' artifact"
     // TODO(b/337268135): Temporarily disabled until issue fixed.
-    // metalavaK2UastEnabled = false
+    metalavaK2UastEnabled = false
 }
 
 android {
diff --git a/lifecycle/lifecycle-viewmodel/build.gradle b/lifecycle/lifecycle-viewmodel/build.gradle
index 6bb616d..1b2efff 100644
--- a/lifecycle/lifecycle-viewmodel/build.gradle
+++ b/lifecycle/lifecycle-viewmodel/build.gradle
@@ -137,4 +137,5 @@
     type = LibraryType.PUBLISHED_LIBRARY
     inceptionYear = "2017"
     description = "Android Lifecycle ViewModel"
+    metalavaK2UastEnabled = false
 }
diff --git a/paging/paging-common/build.gradle b/paging/paging-common/build.gradle
index 442c910..9d75111 100644
--- a/paging/paging-common/build.gradle
+++ b/paging/paging-common/build.gradle
@@ -142,6 +142,7 @@
     inceptionYear = "2017"
     description = "Android Paging-Common"
     legacyDisableKotlinStrictApiMode = true
+    metalavaK2UastEnabled = false
     samples(project(":paging:paging-samples"))
 }
 
diff --git a/paging/paging-compose/build.gradle b/paging/paging-compose/build.gradle
index 1a9503f..8d938df 100644
--- a/paging/paging-compose/build.gradle
+++ b/paging/paging-compose/build.gradle
@@ -82,6 +82,7 @@
     inceptionYear = "2020"
     description = "Compose integration with Paging"
     legacyDisableKotlinStrictApiMode = true
+    metalavaK2UastEnabled = false
     samples(project(":paging:paging-compose:paging-compose-samples"))
 }
 
diff --git a/paging/paging-testing/build.gradle b/paging/paging-testing/build.gradle
index d759fed..c30a878 100644
--- a/paging/paging-testing/build.gradle
+++ b/paging/paging-testing/build.gradle
@@ -123,6 +123,7 @@
     type = LibraryType.PUBLISHED_TEST_LIBRARY
     inceptionYear = "2022"
     description = "Test artifact for Paging implementation"
+    metalavaK2UastEnabled = false
 }
 
 android {
diff --git a/room/room-common/build.gradle b/room/room-common/build.gradle
index e0502aa..7fda363 100644
--- a/room/room-common/build.gradle
+++ b/room/room-common/build.gradle
@@ -86,4 +86,5 @@
     inceptionYear = "2017"
     description = "Android Room-Common"
     legacyDisableKotlinStrictApiMode = true
+    metalavaK2UastEnabled = false
 }
diff --git a/room/room-migration/build.gradle b/room/room-migration/build.gradle
index 297f114..b10beda 100644
--- a/room/room-migration/build.gradle
+++ b/room/room-migration/build.gradle
@@ -87,4 +87,5 @@
     inceptionYear = "2017"
     description = "Android Room Migration"
     legacyDisableKotlinStrictApiMode = true
+    metalavaK2UastEnabled = false
 }
diff --git a/room/room-runtime/build.gradle b/room/room-runtime/build.gradle
index 1704f4b..ef89648 100644
--- a/room/room-runtime/build.gradle
+++ b/room/room-runtime/build.gradle
@@ -224,4 +224,5 @@
     inceptionYear = "2017"
     description = "Android Room-Runtime"
     legacyDisableKotlinStrictApiMode = true
+    metalavaK2UastEnabled = false
 }
diff --git a/room/room-testing/build.gradle b/room/room-testing/build.gradle
index 55a91b1..13685a4 100644
--- a/room/room-testing/build.gradle
+++ b/room/room-testing/build.gradle
@@ -96,4 +96,5 @@
     inceptionYear = "2017"
     description = "Android Room Testing"
     legacyDisableKotlinStrictApiMode = true
+    metalavaK2UastEnabled = false
 }
diff --git a/tv/tv-foundation/build.gradle b/tv/tv-foundation/build.gradle
index 4d07dde..6ed2770 100644
--- a/tv/tv-foundation/build.gradle
+++ b/tv/tv-foundation/build.gradle
@@ -76,6 +76,7 @@
             "functionality to support TV specific devices sizes, shapes and d-pad navigation " +
             "supported components. It builds upon the Jetpack Compose libraries."
     legacyDisableKotlinStrictApiMode = true
+    metalavaK2UastEnabled = false
 }
 
 // Functions and tasks to monitor changes in copied files.
diff --git a/tv/tv-material/build.gradle b/tv/tv-material/build.gradle
index 166445d..a03d7ea 100644
--- a/tv/tv-material/build.gradle
+++ b/tv/tv-material/build.gradle
@@ -74,5 +74,6 @@
     inceptionYear = "2022"
     description = "build TV applications using controls that adhere to Material Design Language."
     legacyDisableKotlinStrictApiMode = true
+    metalavaK2UastEnabled = false
     samples(project(":tv:tv-material-samples"))
 }
diff --git a/wear/compose/compose-foundation/build.gradle b/wear/compose/compose-foundation/build.gradle
index 0a47a42..59fa0f8 100644
--- a/wear/compose/compose-foundation/build.gradle
+++ b/wear/compose/compose-foundation/build.gradle
@@ -91,4 +91,5 @@
             "gestures. It builds upon the Jetpack Compose libraries."
     samples(project(":wear:compose:compose-foundation-samples"))
     legacyDisableKotlinStrictApiMode = true
+    metalavaK2UastEnabled = false
 }
diff --git a/wear/compose/compose-material/build.gradle b/wear/compose/compose-material/build.gradle
index 3790d67..927c577 100644
--- a/wear/compose/compose-material/build.gradle
+++ b/wear/compose/compose-material/build.gradle
@@ -89,5 +89,6 @@
             "Material Design UX guidelines and specifications. It builds upon the Jetpack Compose" +
             " libraries."
     legacyDisableKotlinStrictApiMode = true
+    metalavaK2UastEnabled = false
     samples(project(":wear:compose:compose-material-samples"))
 }
diff --git a/wear/compose/compose-material3/build.gradle b/wear/compose/compose-material3/build.gradle
index 1045a16..fa693ff 100644
--- a/wear/compose/compose-material3/build.gradle
+++ b/wear/compose/compose-material3/build.gradle
@@ -89,6 +89,7 @@
             "implement Wear Material 3 Design UX guidelines and specifications. It builds upon " +
             "the Jetpack Compose libraries."
     legacyDisableKotlinStrictApiMode = true
+    metalavaK2UastEnabled = false
     samples(project(":wear:compose:compose-material3-samples"))
 }
 
diff --git a/window/window-core/build.gradle b/window/window-core/build.gradle
index d0ff8ee..14da27d 100644
--- a/window/window-core/build.gradle
+++ b/window/window-core/build.gradle
@@ -72,4 +72,5 @@
     inceptionYear = "2022"
     description = "WindowManager Core Library."
     legacyDisableKotlinStrictApiMode = true
+    metalavaK2UastEnabled = false
 }