Merge "Upgrade to Android Gradle Plugin 8.0.0-alpha07" into androidx-main
diff --git a/appsearch/appsearch/build.gradle b/appsearch/appsearch/build.gradle
index c9e4a8b..c82c623 100644
--- a/appsearch/appsearch/build.gradle
+++ b/appsearch/appsearch/build.gradle
@@ -22,6 +22,9 @@
 }
 
 android {
+    defaultConfig {
+        multiDexEnabled true
+    }
     buildTypes.all {
         consumerProguardFiles "proguard-rules.pro"
     }
@@ -48,6 +51,7 @@
     // This dependency is unused by the test implementation, but it's here to validate that
     // icing's jarjar'ing of the Protobuf_lite doesn't conflict with external dependencies.
     androidTestImplementation(libs.protobufLite)
+    androidTestImplementation(libs.multidex)
 }
 
 androidx {
diff --git a/benchmark/benchmark-junit4/build.gradle b/benchmark/benchmark-junit4/build.gradle
index 3ee2141..ee2aaf0 100644
--- a/benchmark/benchmark-junit4/build.gradle
+++ b/benchmark/benchmark-junit4/build.gradle
@@ -37,7 +37,7 @@
 
     implementation("androidx.test:rules:1.4.0")
     implementation("androidx.test:runner:1.4.0")
-    implementation("androidx.tracing:tracing-ktx:1.0.0")
+    implementation("androidx.tracing:tracing-ktx:1.1.0")
     api("androidx.annotation:annotation:1.1.0")
 
     androidTestImplementation(project(":internal-testutils-ktx"))
diff --git a/compose/runtime/runtime-lint/src/test/java/androidx/compose/runtime/lint/ComposableLambdaParameterDetectorTest.kt b/compose/runtime/runtime-lint/src/test/java/androidx/compose/runtime/lint/ComposableLambdaParameterDetectorTest.kt
index 463830d..4ace0ae 100644
--- a/compose/runtime/runtime-lint/src/test/java/androidx/compose/runtime/lint/ComposableLambdaParameterDetectorTest.kt
+++ b/compose/runtime/runtime-lint/src/test/java/androidx/compose/runtime/lint/ComposableLambdaParameterDetectorTest.kt
@@ -59,6 +59,7 @@
             Stubs.Composable
         )
             .skipTestModes(TestMode.TYPE_ALIAS)
+            .skipTestModes(TestMode.SUPPRESSIBLE) // b/257293458
             .run()
             .expect(
                 """
@@ -96,6 +97,7 @@
             Stubs.Composable
         )
             .skipTestModes(TestMode.TYPE_ALIAS)
+            .skipTestModes(TestMode.SUPPRESSIBLE) // b/257293458
             .run()
             .expect(
                 """
@@ -125,6 +127,7 @@
             Stubs.Composable
         )
             .skipTestModes(TestMode.TYPE_ALIAS)
+            .skipTestModes(TestMode.SUPPRESSIBLE) // b/257293458
             .run()
             .expect(
                 """
@@ -166,6 +169,7 @@
             ),
             Stubs.Composable
         )
+            .skipTestModes(TestMode.SUPPRESSIBLE) // b/257293458
             .run()
             .expect(
                 """
@@ -231,6 +235,7 @@
             Stubs.Composable
         )
             .skipTestModes(TestMode.TYPE_ALIAS)
+            .skipTestModes(TestMode.SUPPRESSIBLE) // b/257293458
             .run()
             .expect(
                 """
diff --git a/compose/ui/ui-lint/src/test/java/androidx/compose/ui/lint/ModifierParameterDetectorTest.kt b/compose/ui/ui-lint/src/test/java/androidx/compose/ui/lint/ModifierParameterDetectorTest.kt
index f3aba8d..0c5b55e 100644
--- a/compose/ui/ui-lint/src/test/java/androidx/compose/ui/lint/ModifierParameterDetectorTest.kt
+++ b/compose/ui/ui-lint/src/test/java/androidx/compose/ui/lint/ModifierParameterDetectorTest.kt
@@ -20,6 +20,7 @@
 
 import androidx.compose.lint.test.Stubs
 import com.android.tools.lint.checks.infrastructure.LintDetectorTest
+import com.android.tools.lint.checks.infrastructure.TestMode
 import com.android.tools.lint.detector.api.Detector
 import com.android.tools.lint.detector.api.Issue
 import org.junit.Test
@@ -62,6 +63,7 @@
             Stubs.Composable,
             Stubs.Modifier
         )
+            .skipTestModes(TestMode.SUPPRESSIBLE) // b/257293766
             .run()
             .expect(
                 """
@@ -103,6 +105,7 @@
             Stubs.Composable,
             Stubs.Modifier
         )
+            .skipTestModes(TestMode.SUPPRESSIBLE) // b/257293766
             .run()
             .expect(
                 """
@@ -146,6 +149,7 @@
             Stubs.Composable,
             Stubs.Modifier
         )
+            .skipTestModes(TestMode.SUPPRESSIBLE) // b/257293766
             .run()
             .expect(
                 """
@@ -187,6 +191,7 @@
             Stubs.Composable,
             Stubs.Modifier
         )
+            .skipTestModes(TestMode.SUPPRESSIBLE) // b/257293766
             .run()
             .expect(
                 """
@@ -222,6 +227,7 @@
             Stubs.Composable,
             Stubs.Modifier
         )
+            .skipTestModes(TestMode.SUPPRESSIBLE) // b/257293766
             .run()
             .expect(
                 """
diff --git a/development/update_studio.sh b/development/update_studio.sh
index 292d6fbb..187a9d4 100755
--- a/development/update_studio.sh
+++ b/development/update_studio.sh
@@ -1,7 +1,7 @@
 #!/bin/bash
 # Get versions
-AGP_VERSION=${1:-8.0.0-alpha05}
-STUDIO_VERSION_STRING=${2:-"Android Studio Flamingo (2022.2.1) Canary 5"}
+AGP_VERSION=${1:-8.0.0-alpha07}
+STUDIO_VERSION_STRING=${2:-"Android Studio Flamingo (2022.2.1) Canary 7"}
 STUDIO_IFRAME_LINK=`curl "https://developer.android.com/studio/archive.html" | grep iframe | sed "s/.*src=\"\([a-zA-Z0-9\/\._]*\)\".*/https:\/\/android-dot-devsite-v2-prod.appspot.com\1/g"`
 STUDIO_LINK=`curl -s $STUDIO_IFRAME_LINK | grep -C30 "$STUDIO_VERSION_STRING" | grep Linux | tail -n 1 | sed 's/.*a href="\(.*\).*"/\1/g'`
 STUDIO_VERSION=`echo $STUDIO_LINK | sed "s/.*ide-zips\/\(.*\)\/android-studio-.*/\1/g"`
@@ -20,6 +20,7 @@
 ARTIFACTS_TO_DOWNLOAD+="com.android.tools.lint:lint:$LINT_VERSION,"
 ARTIFACTS_TO_DOWNLOAD+="com.android.tools.lint:lint-tests:$LINT_VERSION,"
 ARTIFACTS_TO_DOWNLOAD+="com.android.tools.lint:lint-gradle:$LINT_VERSION,"
+ARTIFACTS_TO_DOWNLOAD+="com.android.tools:ninepatch:$LINT_VERSION,"
 
 # Update studio_versions.properties
 sed -i "s/androidGradlePlugin = .*/androidGradlePlugin = \"$AGP_VERSION\"/g" gradle/libs.versions.toml
diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml
index 4831e6ca..0546b9e 100644
--- a/gradle/libs.versions.toml
+++ b/gradle/libs.versions.toml
@@ -2,13 +2,13 @@
 # -----------------------------------------------------------------------------
 # All of the following should be updated in sync.
 # -----------------------------------------------------------------------------
-androidGradlePlugin = "8.0.0-alpha05"
+androidGradlePlugin = "8.0.0-alpha07"
 # NOTE: When updating the lint version we also need to update the `api` version
 # supported by `IssueRegistry`'s.' For e.g. r.android.com/1331903
-androidLint = "31.0.0-alpha05"
+androidLint = "31.0.0-alpha07"
 # Once you have a chosen version of AGP to upgrade to, go to
 # https://developer.android.com/studio/archive and find the matching version of Studio.
-androidStudio = "2022.2.1.5"
+androidStudio = "2022.2.1.7"
 # -----------------------------------------------------------------------------
 
 androidGradlePluginMin = "7.0.4"
diff --git a/lifecycle/lifecycle-extensions/build.gradle b/lifecycle/lifecycle-extensions/build.gradle
index cf246c3..92c8382 100644
--- a/lifecycle/lifecycle-extensions/build.gradle
+++ b/lifecycle/lifecycle-extensions/build.gradle
@@ -45,6 +45,7 @@
     androidTestImplementation(libs.testRunner)
     androidTestImplementation(libs.testRules)
     androidTestImplementation(libs.espressoCore)
+    androidTestImplementation(libs.multidex)
     androidTestImplementation("androidx.appcompat:appcompat:1.1.0")
     androidTestImplementation(project(":internal-testutils-runtime"))
 }
@@ -60,5 +61,8 @@
 }
 
 android {
+    defaultConfig {
+        multiDexEnabled true
+    }
     namespace "androidx.lifecycle.extensions"
 }
diff --git a/lint-checks/src/test/java/androidx/build/lint/ExperimentalPropertyAnnotationDetectorTest.kt b/lint-checks/src/test/java/androidx/build/lint/ExperimentalPropertyAnnotationDetectorTest.kt
index 07806af..5733f15 100644
--- a/lint-checks/src/test/java/androidx/build/lint/ExperimentalPropertyAnnotationDetectorTest.kt
+++ b/lint-checks/src/test/java/androidx/build/lint/ExperimentalPropertyAnnotationDetectorTest.kt
@@ -16,6 +16,7 @@
 
 package androidx.build.lint
 
+import com.android.tools.lint.checks.infrastructure.TestMode
 import org.junit.Test
 import org.junit.runner.RunWith
 import org.junit.runners.JUnit4
@@ -121,7 +122,13 @@
         """
         /* ktlint-enable max-line-length */
 
-        check(*input)
+        lint()
+            .files(
+                *stubs,
+                *input
+            )
+            .skipTestModes(TestMode.SUPPRESSIBLE) // b/257294309
+            .run()
             .expect(expected)
             .expectFixDiffs(expectedFixDiffs)
     }
@@ -199,7 +206,13 @@
         """
         /* ktlint-enable max-line-length */
 
-        check(*input)
+        lint()
+            .files(
+                *stubs,
+                *input
+            )
+            .skipTestModes(TestMode.SUPPRESSIBLE) // b/257294309
+            .run()
             .expect(expected)
             .expectFixDiffs(expectedFixDiffs)
     }
@@ -278,7 +291,13 @@
         """
         /* ktlint-enable max-line-length */
 
-        check(*input)
+        lint()
+            .files(
+                *stubs,
+                *input
+            )
+            .skipTestModes(TestMode.SUPPRESSIBLE) // b/257294309
+            .run()
             .expect(expected)
             .expectFixDiffs(expectedFixDiffs)
     }
@@ -371,7 +390,13 @@
         """
         /* ktlint-enable max-line-length */
 
-        check(*input)
+        lint()
+            .files(
+                *stubs,
+                *input
+            )
+            .skipTestModes(TestMode.SUPPRESSIBLE) // b/257294309
+            .run()
             .expect(expected)
             .expectFixDiffs(expectedFixDiffs)
     }
@@ -405,7 +430,13 @@
         """
         /* ktlint-enable max-line-length */
 
-        check(*input)
+        lint()
+            .files(
+                *stubs,
+                *input
+            )
+            .skipTestModes(TestMode.SUPPRESSIBLE) // b/257294309
+            .run()
             .expect(expected)
             .expectFixDiffs(expectedFixDiffs)
     }
@@ -443,7 +474,13 @@
         """
         /* ktlint-enable max-line-length */
 
-        check(*input)
+        lint()
+            .files(
+                *stubs,
+                *input
+            )
+            .skipTestModes(TestMode.SUPPRESSIBLE) // b/257294309
+            .run()
             .expect(expected)
             .expectFixDiffs(expectedFixDiffs)
     }
@@ -478,7 +515,13 @@
         """
         /* ktlint-enable max-line-length */
 
-        check(*input)
+        lint()
+            .files(
+                *stubs,
+                *input
+            )
+            .skipTestModes(TestMode.SUPPRESSIBLE) // b/257294309
+            .run()
             .expect(expected)
             .expectFixDiffs(expectedFixDiffs)
     }
diff --git a/navigation/navigation-common/build.gradle b/navigation/navigation-common/build.gradle
index 57222fb..33cb3fe 100644
--- a/navigation/navigation-common/build.gradle
+++ b/navigation/navigation-common/build.gradle
@@ -26,6 +26,9 @@
     buildTypes.all {
         consumerProguardFiles "proguard-rules.pro"
     }
+    defaultConfig {
+        multiDexEnabled true
+    }
     namespace "androidx.navigation.common"
 }
 
@@ -56,6 +59,7 @@
     androidTestImplementation(libs.mockitoCore, excludes.bytebuddy)
     androidTestImplementation(libs.dexmakerMockito, excludes.bytebuddy)
     androidTestImplementation(libs.kotlinStdlib)
+    androidTestImplementation(libs.multidex)
 
     lintPublish(project(':navigation:navigation-common-lint'))
 }
diff --git a/navigation/navigation-runtime-lint/src/test/java/androidx/navigation/runtime/lint/DeepLinkInActivityDestinationDetectorTest.kt b/navigation/navigation-runtime-lint/src/test/java/androidx/navigation/runtime/lint/DeepLinkInActivityDestinationDetectorTest.kt
index 2619c96..b6215a9 100644
--- a/navigation/navigation-runtime-lint/src/test/java/androidx/navigation/runtime/lint/DeepLinkInActivityDestinationDetectorTest.kt
+++ b/navigation/navigation-runtime-lint/src/test/java/androidx/navigation/runtime/lint/DeepLinkInActivityDestinationDetectorTest.kt
@@ -17,6 +17,7 @@
 package androidx.navigation.runtime.lint
 
 import com.android.tools.lint.checks.infrastructure.LintDetectorTest
+import com.android.tools.lint.checks.infrastructure.TestMode
 import com.android.tools.lint.detector.api.Detector
 import com.android.tools.lint.detector.api.Issue
 import org.junit.Test
@@ -89,6 +90,7 @@
             """
             )
         )
+            .skipTestModes(TestMode.SUPPRESSIBLE) // b/257336973
             .run()
             .expect("""
 res/navigation/nav_main.xml:17: Warning: Do not attach a <deeplink> to an <activity> destination. Attach the deeplink directly to the second activity or the start destination of a nav host in the second activity instead. [DeepLinkInActivityDestination]