[go: nahoru, domu]

Upgrade to AGP 7.2.0-alpha07

- Update lint baselines for new issues
- Update ExperimentalDetector to remove usages of AnnotationLookup
  that was removed in ag/16423954

Test: open studio and run an android test
      ./gradlew assembleDebug
Change-Id: I5953d76a8cb1e01f4e6ab471294438aadbeff9fc
Merged-In: I5953d76a8cb1e01f4e6ab471294438aadbeff9fc
diff --git a/annotation/annotation-experimental-lint/src/main/java/androidx/annotation/experimental/lint/ExperimentalDetector.kt b/annotation/annotation-experimental-lint/src/main/java/androidx/annotation/experimental/lint/ExperimentalDetector.kt
index d04289f..d4a78be 100644
--- a/annotation/annotation-experimental-lint/src/main/java/androidx/annotation/experimental/lint/ExperimentalDetector.kt
+++ b/annotation/annotation-experimental-lint/src/main/java/androidx/annotation/experimental/lint/ExperimentalDetector.kt
@@ -18,7 +18,6 @@
 
 package androidx.annotation.experimental.lint
 
-import com.android.tools.lint.client.api.AnnotationLookup
 import com.android.tools.lint.client.api.JavaEvaluator
 import com.android.tools.lint.detector.api.AnnotationUsageType
 import com.android.tools.lint.detector.api.AnnotationUsageType.FIELD_REFERENCE
@@ -64,12 +63,12 @@
 import org.jetbrains.uast.UReferenceExpression
 import org.jetbrains.uast.USimpleNameReferenceExpression
 import org.jetbrains.uast.UVariable
+import org.jetbrains.uast.UastFacade
 import org.jetbrains.uast.getContainingUClass
 import org.jetbrains.uast.getContainingUMethod
 import org.jetbrains.uast.java.JavaUAnnotation
 import org.jetbrains.uast.toUElement
 import org.jetbrains.uast.tryResolve
-import java.util.ArrayList
 
 class ExperimentalDetector : Detector(), SourceCodeScanner {
     private val visitedUsages: MutableMap<UElement, MutableSet<String>> = mutableMapOf()
@@ -128,15 +127,13 @@
     ) {
         val evaluator = context.evaluator
         val allAnnotations = evaluator.getAllAnnotations(superMethod, inHierarchy = true)
-        val methodAnnotations = filterRelevantAnnotations(
-            evaluator, allAnnotations, usage,
-        )
+        val methodAnnotations = filterRelevantAnnotations(evaluator, allAnnotations)
 
         // Look for annotations on the class as well: these trickle
         // down to all the methods in the class
         val containingClass: PsiClass? = superMethod.containingClass
         val (classAnnotations, pkgAnnotations) = getClassAndPkgAnnotations(
-            containingClass, evaluator, usage
+            containingClass, evaluator
         )
 
         doCheckMethodOverride(
@@ -320,7 +317,6 @@
     private fun getClassAndPkgAnnotations(
         containingClass: PsiClass?,
         evaluator: JavaEvaluator,
-        context: UElement,
     ): Pair<List<UAnnotation>, List<UAnnotation>> {
 
         // Yes, returning a pair is ugly. But we are initializing two lists, and splitting this
@@ -332,7 +328,7 @@
 
         if (containingClass != null) {
             val annotations = evaluator.getAllAnnotations(containingClass, inHierarchy = true)
-            classAnnotations = filterRelevantAnnotations(evaluator, annotations, context)
+            classAnnotations = filterRelevantAnnotations(evaluator, annotations)
 
             val pkg = evaluator.getPackage(containingClass)
             pkgAnnotations = if (pkg != null) {
@@ -355,7 +351,6 @@
     private fun filterRelevantAnnotations(
         evaluator: JavaEvaluator,
         annotations: Array<PsiAnnotation>,
-        context: UElement? = null
     ): List<UAnnotation> {
         var result: MutableList<UAnnotation>? = null
         val length = annotations.size
@@ -412,7 +407,11 @@
                     if (result == null) {
                         result = ArrayList(2)
                     }
-                    val innerU = annotationLookup.findRealAnnotation(inner, cls, context)
+                    val innerU = UastFacade.convertElement(
+                        inner,
+                        null,
+                        UAnnotation::class.java
+                    ) as UAnnotation
                     result.add(innerU)
                 }
             }
@@ -425,8 +424,6 @@
     private val relevantAnnotations: List<String>
         get() = applicableAnnotations()
 
-    private val annotationLookup = AnnotationLookup()
-
     override fun visitAnnotationUsage(
         context: JavaContext,
         usage: UElement,
diff --git a/benchmark/benchmark-common/lint-baseline.xml b/benchmark/benchmark-common/lint-baseline.xml
index 03103f4..339fe4a 100644
--- a/benchmark/benchmark-common/lint-baseline.xml
+++ b/benchmark/benchmark-common/lint-baseline.xml
@@ -1,26 +1,15 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<issues format="6" by="lint 7.2.0-dev" type="baseline" client="gradle" dependencies="false" name="AGP (7.2.0-dev)" variant="all" version="7.2.0-dev">
+<issues format="6" by="lint 7.2.0-alpha07" type="baseline" client="gradle" dependencies="false" name="AGP (7.2.0-alpha07)" variant="all" version="7.2.0-alpha07">
 
     <issue
-        id="UnknownNullness"
-        message="Should explicitly declare type here since implicit type does not specify nullness"
-        errorLine1="    internal fun getReport() = checkState().run { getReport(&quot;&quot;, &quot;&quot;) }"
-        errorLine2="                 ~~~~~~~~~">
+        id="NewApi"
+        message="Field requires API level 23 (current min is 14): `getBACKGROUND_SPINNING_PROCESS_NAME`"
+        errorLine1="                BACKGROUND_SPINNING_PROCESS_NAME"
+        errorLine2="                ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
         <location
-            file="src/main/java/androidx/benchmark/BenchmarkState.kt"
-            line="461"
-            column="18"/>
-    </issue>
-
-    <issue
-        id="UnknownNullness"
-        message="Should explicitly declare type here since implicit type does not specify nullness"
-        errorLine1="internal fun String.toOutputMetricName() = this"
-        errorLine2="                    ~~~~~~~~~~~~~~~~~~">
-        <location
-            file="src/main/java/androidx/benchmark/MetricNameUtils.kt"
-            line="32"
-            column="21"/>
+            file="src/androidTest/java/androidx/benchmark/ShellTest.kt"
+            line="48"
+            column="17"/>
     </issue>
 
 </issues>
diff --git a/compose/ui/ui/lint-baseline.xml b/compose/ui/ui/lint-baseline.xml
index 01f15f2..f1cf020 100644
--- a/compose/ui/ui/lint-baseline.xml
+++ b/compose/ui/ui/lint-baseline.xml
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<issues format="6" by="lint 7.1.0-beta02" type="baseline" client="cli" dependencies="false" name="AGP (7.1.0-beta02)" variant="all" version="7.1.0-beta02">
+<issues format="6" by="lint 7.2.0-alpha07" type="baseline" client="gradle" dependencies="false" name="AGP (7.2.0-alpha07)" variant="all" version="7.2.0-alpha07">
 
     <issue
         id="NewApi"
@@ -19,18 +19,29 @@
         errorLine2="        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
         <location
             file="src/androidAndroidTest/kotlin/androidx/compose/ui/AndroidLayoutDrawTest.kt"
-            line="224"
+            line="226"
             column="9"/>
     </issue>
 
     <issue
         id="NewApi"
+        message="Call requires API level 29 (current min is 21): `setCameraDistance`"
+        errorLine1="            this.cameraDistance = cameraDistance"
+        errorLine2="                                  ~~~~~~~~~~~~~~">
+        <location
+            file="src/androidAndroidTest/kotlin/androidx/compose/ui/AndroidLayoutDrawTest.kt"
+            line="227"
+            column="35"/>
+    </issue>
+
+    <issue
+        id="NewApi"
         message="Field requires API level 29 (current min is 21): `setCameraDistance`"
         errorLine1="            this.cameraDistance = cameraDistance"
         errorLine2="                 ~~~~~~~~~~~~~~">
         <location
             file="src/androidAndroidTest/kotlin/androidx/compose/ui/AndroidLayoutDrawTest.kt"
-            line="225"
+            line="227"
             column="18"/>
     </issue>
 
@@ -41,7 +52,7 @@
         errorLine2="          ~~~~~~~~~~~~~~~~~~">
         <location
             file="src/androidAndroidTest/kotlin/androidx/compose/ui/AndroidLayoutDrawTest.kt"
-            line="226"
+            line="228"
             column="11"/>
     </issue>
 
@@ -52,18 +63,29 @@
         errorLine2="        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
         <location
             file="src/androidAndroidTest/kotlin/androidx/compose/ui/AndroidLayoutDrawTest.kt"
-            line="231"
+            line="233"
             column="9"/>
     </issue>
 
     <issue
         id="NewApi"
+        message="Call requires API level 23 (current min is 21): `setCameraDistance`"
+        errorLine1="            this.cameraDistance = cameraDistance"
+        errorLine2="                                  ~~~~~~~~~~~~~~">
+        <location
+            file="src/androidAndroidTest/kotlin/androidx/compose/ui/AndroidLayoutDrawTest.kt"
+            line="234"
+            column="35"/>
+    </issue>
+
+    <issue
+        id="NewApi"
         message="Field requires API level 23 (current min is 21): `setCameraDistance`"
         errorLine1="            this.cameraDistance = cameraDistance"
         errorLine2="                 ~~~~~~~~~~~~~~">
         <location
             file="src/androidAndroidTest/kotlin/androidx/compose/ui/AndroidLayoutDrawTest.kt"
-            line="232"
+            line="234"
             column="18"/>
     </issue>
 
@@ -74,7 +96,7 @@
         errorLine2="          ~~~~~~~~~~~~~~~~~~">
         <location
             file="src/androidAndroidTest/kotlin/androidx/compose/ui/AndroidLayoutDrawTest.kt"
-            line="233"
+            line="235"
             column="11"/>
     </issue>
 
@@ -85,452 +107,12 @@
         errorLine2="                 ~~~~~~~~~~~~~~~~~">
         <location
             file="src/androidAndroidTest/kotlin/androidx/compose/ui/AndroidLayoutDrawTest.kt"
-            line="3778"
+            line="3866"
             column="18"/>
     </issue>
 
     <issue
         id="NewApi"
-        message="Call requires API level 26 (current min is 21): `AndroidAutofill`"
-        errorLine1="        androidAutofill = AndroidAutofill(view, autofillTree)"
-        errorLine2="                          ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
-        <location
-            file="src/test/kotlin/androidx/compose/ui/autofill/AndroidPerformAutofillTest.kt"
-            line="46"
-            column="27"/>
-    </issue>
-
-    <issue
-        id="NewApi"
-        message="Call requires API level 26 (current min is 21): `android.view.autofill.AutofillValue#forText`"
-        errorLine1="            .apply { append(autofillNode.id, AutofillValue.forText(expectedValue)) }"
-        errorLine2="                                                           ~~~~~~~">
-        <location
-            file="src/test/kotlin/androidx/compose/ui/autofill/AndroidPerformAutofillTest.kt"
-            line="62"
-            column="60"/>
-    </issue>
-
-    <issue
-        id="NewApi"
-        message="Call requires API level 26 (current min is 21): `performAutofill`"
-        errorLine1="        androidAutofill.performAutofill(autofillValues)"
-        errorLine2="                        ~~~~~~~~~~~~~~~">
-        <location
-            file="src/test/kotlin/androidx/compose/ui/autofill/AndroidPerformAutofillTest.kt"
-            line="65"
-            column="25"/>
-    </issue>
-
-    <issue
-        id="NewApi"
-        message="Call requires API level 26 (current min is 21): `android.view.autofill.AutofillValue#forText`"
-        errorLine1="            .apply { append(autofillNode.id, AutofillValue.forText(expectedValue)) }"
-        errorLine2="                                                           ~~~~~~~">
-        <location
-            file="src/test/kotlin/androidx/compose/ui/autofill/AndroidPerformAutofillTest.kt"
-            line="84"
-            column="60"/>
-    </issue>
-
-    <issue
-        id="NewApi"
-        message="Call requires API level 26 (current min is 21): `performAutofill`"
-        errorLine1="        androidAutofill.performAutofill(autofillValues)"
-        errorLine2="                        ~~~~~~~~~~~~~~~">
-        <location
-            file="src/test/kotlin/androidx/compose/ui/autofill/AndroidPerformAutofillTest.kt"
-            line="87"
-            column="25"/>
-    </issue>
-
-    <issue
-        id="NewApi"
-        message="Call requires API level 26 (current min is 21): `AndroidAutofill`"
-        errorLine1="        androidAutofill = AndroidAutofill(view, autofillTree)"
-        errorLine2="                          ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
-        <location
-            file="src/test/kotlin/androidx/compose/ui/autofill/AndroidPopulateViewStructureTest.kt"
-            line="50"
-            column="27"/>
-    </issue>
-
-    <issue
-        id="NewApi"
-        message="Call requires API level 26 (current min is 21): `FakeAndroidViewStructure`"
-        errorLine1="        val viewStructure: ViewStructure = FakeAndroidViewStructure()"
-        errorLine2="                                           ~~~~~~~~~~~~~~~~~~~~~~~~~~">
-        <location
-            file="src/test/kotlin/androidx/compose/ui/autofill/AndroidPopulateViewStructureTest.kt"
-            line="57"
-            column="44"/>
-    </issue>
-
-    <issue
-        id="NewApi"
-        message="Call requires API level 26 (current min is 21): `populateViewStructure`"
-        errorLine1="        androidAutofill.populateViewStructure(viewStructure)"
-        errorLine2="                        ~~~~~~~~~~~~~~~~~~~~~">
-        <location
-            file="src/test/kotlin/androidx/compose/ui/autofill/AndroidPopulateViewStructureTest.kt"
-            line="60"
-            column="25"/>
-    </issue>
-
-    <issue
-        id="NewApi"
-        message="Call requires API level 23 (current min is 21): `android.view.ViewStructure#getChildCount`"
-        errorLine1="        assertThat(viewStructure.childCount).isEqualTo(0)"
-        errorLine2="                                 ~~~~~~~~~~">
-        <location
-            file="src/test/kotlin/androidx/compose/ui/autofill/AndroidPopulateViewStructureTest.kt"
-            line="63"
-            column="34"/>
-    </issue>
-
-    <issue
-        id="NewApi"
-        message="Call requires API level 26 (current min is 21): `FakeAndroidViewStructure`"
-        errorLine1="        val viewStructure = FakeAndroidViewStructure()"
-        errorLine2="                            ~~~~~~~~~~~~~~~~~~~~~~~~~~">
-        <location
-            file="src/test/kotlin/androidx/compose/ui/autofill/AndroidPopulateViewStructureTest.kt"
-            line="77"
-            column="29"/>
-    </issue>
-
-    <issue
-        id="NewApi"
-        message="Call requires API level 26 (current min is 21): `populateViewStructure`"
-        errorLine1="        androidAutofill.populateViewStructure(viewStructure)"
-        errorLine2="                        ~~~~~~~~~~~~~~~~~~~~~">
-        <location
-            file="src/test/kotlin/androidx/compose/ui/autofill/AndroidPopulateViewStructureTest.kt"
-            line="78"
-            column="25"/>
-    </issue>
-
-    <issue
-        id="NewApi"
-        message="Call requires API level 26 (current min is 21): `FakeAndroidViewStructure`"
-        errorLine1="            FakeAndroidViewStructure().apply {"
-        errorLine2="            ~~~~~~~~~~~~~~~~~~~~~~~~~~">
-        <location
-            file="src/test/kotlin/androidx/compose/ui/autofill/AndroidPopulateViewStructureTest.kt"
-            line="82"
-            column="13"/>
-    </issue>
-
-    <issue
-        id="NewApi"
-        message="Call requires API level 26 (current min is 21): `FakeAndroidViewStructure`"
-        errorLine1="                    FakeAndroidViewStructure().apply {"
-        errorLine2="                    ~~~~~~~~~~~~~~~~~~~~~~~~~~">
-        <location
-            file="src/test/kotlin/androidx/compose/ui/autofill/AndroidPopulateViewStructureTest.kt"
-            line="84"
-            column="21"/>
-    </issue>
-
-    <issue
-        id="NewApi"
-        message="Call requires API level 26 (current min is 21): `setAutofillType`"
-        errorLine1="                        setAutofillType(View.AUTOFILL_TYPE_TEXT)"
-        errorLine2="                        ~~~~~~~~~~~~~~~">
-        <location
-            file="src/test/kotlin/androidx/compose/ui/autofill/AndroidPopulateViewStructureTest.kt"
-            line="87"
-            column="25"/>
-    </issue>
-
-    <issue
-        id="NewApi"
-        message="Call requires API level 26 (current min is 21): `setAutofillType`"
-        errorLine1="                        setAutofillType(View.AUTOFILL_TYPE_TEXT)"
-        errorLine2="                                        ~~~~~~~~~~~~~~~~~~~~~~~">
-        <location
-            file="src/test/kotlin/androidx/compose/ui/autofill/AndroidPopulateViewStructureTest.kt"
-            line="87"
-            column="41"/>
-    </issue>
-
-    <issue
-        id="NewApi"
-        message="Call requires API level 26 (current min is 21): `setAutofillHints`"
-        errorLine1="                        setAutofillHints(arrayOf(AUTOFILL_HINT_PERSON_NAME))"
-        errorLine2="                        ~~~~~~~~~~~~~~~~">
-        <location
-            file="src/test/kotlin/androidx/compose/ui/autofill/AndroidPopulateViewStructureTest.kt"
-            line="88"
-            column="25"/>
-    </issue>
-
-    <issue
-        id="NewApi"
-        message="Call requires API level 26 (current min is 21): `setAutofillHints`"
-        errorLine1="                        setAutofillHints(arrayOf(AUTOFILL_HINT_PERSON_NAME))"
-        errorLine2="                                         ~~~~~~~">
-        <location
-            file="src/test/kotlin/androidx/compose/ui/autofill/AndroidPopulateViewStructureTest.kt"
-            line="88"
-            column="42"/>
-    </issue>
-
-    <issue
-        id="NewApi"
-        message="Call requires API level 26 (current min is 21): `setDimens`"
-        errorLine1="                        setDimens(0, 0, 0, 0, 0, 0)"
-        errorLine2="                        ~~~~~~~~~">
-        <location
-            file="src/test/kotlin/androidx/compose/ui/autofill/AndroidPopulateViewStructureTest.kt"
-            line="89"
-            column="25"/>
-    </issue>
-
-    <issue
-        id="NewApi"
-        message="Call requires API level 26 (current min is 21): `FakeAndroidViewStructure`"
-        errorLine1="        val viewStructure: ViewStructure = FakeAndroidViewStructure()"
-        errorLine2="                                           ~~~~~~~~~~~~~~~~~~~~~~~~~~">
-        <location
-            file="src/test/kotlin/androidx/compose/ui/autofill/AndroidPopulateViewStructureTest.kt"
-            line="114"
-            column="44"/>
-    </issue>
-
-    <issue
-        id="NewApi"
-        message="Call requires API level 26 (current min is 21): `populateViewStructure`"
-        errorLine1="        androidAutofill.populateViewStructure(viewStructure)"
-        errorLine2="                        ~~~~~~~~~~~~~~~~~~~~~">
-        <location
-            file="src/test/kotlin/androidx/compose/ui/autofill/AndroidPopulateViewStructureTest.kt"
-            line="115"
-            column="25"/>
-    </issue>
-
-    <issue
-        id="NewApi"
-        message="Call requires API level 26 (current min is 21): `FakeAndroidViewStructure`"
-        errorLine1="            FakeAndroidViewStructure().apply {"
-        errorLine2="            ~~~~~~~~~~~~~~~~~~~~~~~~~~">
-        <location
-            file="src/test/kotlin/androidx/compose/ui/autofill/AndroidPopulateViewStructureTest.kt"
-            line="119"
-            column="13"/>
-    </issue>
-
-    <issue
-        id="NewApi"
-        message="Call requires API level 26 (current min is 21): `FakeAndroidViewStructure`"
-        errorLine1="                    FakeAndroidViewStructure().apply {"
-        errorLine2="                    ~~~~~~~~~~~~~~~~~~~~~~~~~~">
-        <location
-            file="src/test/kotlin/androidx/compose/ui/autofill/AndroidPopulateViewStructureTest.kt"
-            line="121"
-            column="21"/>
-    </issue>
-
-    <issue
-        id="NewApi"
-        message="Call requires API level 26 (current min is 21): `setAutofillType`"
-        errorLine1="                        setAutofillType(View.AUTOFILL_TYPE_TEXT)"
-        errorLine2="                        ~~~~~~~~~~~~~~~">
-        <location
-            file="src/test/kotlin/androidx/compose/ui/autofill/AndroidPopulateViewStructureTest.kt"
-            line="124"
-            column="25"/>
-    </issue>
-
-    <issue
-        id="NewApi"
-        message="Call requires API level 26 (current min is 21): `setAutofillType`"
-        errorLine1="                        setAutofillType(View.AUTOFILL_TYPE_TEXT)"
-        errorLine2="                                        ~~~~~~~~~~~~~~~~~~~~~~~">
-        <location
-            file="src/test/kotlin/androidx/compose/ui/autofill/AndroidPopulateViewStructureTest.kt"
-            line="124"
-            column="41"/>
-    </issue>
-
-    <issue
-        id="NewApi"
-        message="Call requires API level 26 (current min is 21): `setAutofillHints`"
-        errorLine1="                        setAutofillHints(arrayOf(AUTOFILL_HINT_PERSON_NAME))"
-        errorLine2="                        ~~~~~~~~~~~~~~~~">
-        <location
-            file="src/test/kotlin/androidx/compose/ui/autofill/AndroidPopulateViewStructureTest.kt"
-            line="125"
-            column="25"/>
-    </issue>
-
-    <issue
-        id="NewApi"
-        message="Call requires API level 26 (current min is 21): `setAutofillHints`"
-        errorLine1="                        setAutofillHints(arrayOf(AUTOFILL_HINT_PERSON_NAME))"
-        errorLine2="                                         ~~~~~~~">
-        <location
-            file="src/test/kotlin/androidx/compose/ui/autofill/AndroidPopulateViewStructureTest.kt"
-            line="125"
-            column="42"/>
-    </issue>
-
-    <issue
-        id="NewApi"
-        message="Call requires API level 26 (current min is 21): `setDimens`"
-        errorLine1="                        setDimens(0, 0, 0, 0, 0, 0)"
-        errorLine2="                        ~~~~~~~~~">
-        <location
-            file="src/test/kotlin/androidx/compose/ui/autofill/AndroidPopulateViewStructureTest.kt"
-            line="126"
-            column="25"/>
-    </issue>
-
-    <issue
-        id="NewApi"
-        message="Call requires API level 26 (current min is 21): `FakeAndroidViewStructure`"
-        errorLine1="                    FakeAndroidViewStructure().apply {"
-        errorLine2="                    ~~~~~~~~~~~~~~~~~~~~~~~~~~">
-        <location
-            file="src/test/kotlin/androidx/compose/ui/autofill/AndroidPopulateViewStructureTest.kt"
-            line="130"
-            column="21"/>
-    </issue>
-
-    <issue
-        id="NewApi"
-        message="Call requires API level 26 (current min is 21): `setAutofillType`"
-        errorLine1="                        setAutofillType(View.AUTOFILL_TYPE_TEXT)"
-        errorLine2="                        ~~~~~~~~~~~~~~~">
-        <location
-            file="src/test/kotlin/androidx/compose/ui/autofill/AndroidPopulateViewStructureTest.kt"
-            line="133"
-            column="25"/>
-    </issue>
-
-    <issue
-        id="NewApi"
-        message="Call requires API level 26 (current min is 21): `setAutofillType`"
-        errorLine1="                        setAutofillType(View.AUTOFILL_TYPE_TEXT)"
-        errorLine2="                                        ~~~~~~~~~~~~~~~~~~~~~~~">
-        <location
-            file="src/test/kotlin/androidx/compose/ui/autofill/AndroidPopulateViewStructureTest.kt"
-            line="133"
-            column="41"/>
-    </issue>
-
-    <issue
-        id="NewApi"
-        message="Call requires API level 26 (current min is 21): `setAutofillHints`"
-        errorLine1="                        setAutofillHints(arrayOf(View.AUTOFILL_HINT_EMAIL_ADDRESS))"
-        errorLine2="                        ~~~~~~~~~~~~~~~~">
-        <location
-            file="src/test/kotlin/androidx/compose/ui/autofill/AndroidPopulateViewStructureTest.kt"
-            line="134"
-            column="25"/>
-    </issue>
-
-    <issue
-        id="NewApi"
-        message="Call requires API level 26 (current min is 21): `setAutofillHints`"
-        errorLine1="                        setAutofillHints(arrayOf(View.AUTOFILL_HINT_EMAIL_ADDRESS))"
-        errorLine2="                                         ~~~~~~~">
-        <location
-            file="src/test/kotlin/androidx/compose/ui/autofill/AndroidPopulateViewStructureTest.kt"
-            line="134"
-            column="42"/>
-    </issue>
-
-    <issue
-        id="NewApi"
-        message="Call requires API level 26 (current min is 21): `setDimens`"
-        errorLine1="                        setDimens(0, 0, 0, 0, 0, 0)"
-        errorLine2="                        ~~~~~~~~~">
-        <location
-            file="src/test/kotlin/androidx/compose/ui/autofill/AndroidPopulateViewStructureTest.kt"
-            line="135"
-            column="25"/>
-    </issue>
-
-    <issue
-        id="NewApi"
-        message="Call requires API level 23 (current min is 21): `android.content.Context#getSystemService`"
-        errorLine1="            activity.getSystemService(AutofillManager::class.java)"
-        errorLine2="                     ~~~~~~~~~~~~~~~~">
-        <location
-            file="src/test/kotlin/androidx/compose/ui/autofill/AutofillNodeTest.kt"
-            line="60"
-            column="22"/>
-    </issue>
-
-    <issue
-        id="NewApi"
-        message="Class requires API level 26 (current min is 21): `android.view.autofill.AutofillManager`"
-        errorLine1="            activity.getSystemService(AutofillManager::class.java)"
-        errorLine2="                                      ~~~~~~~~~~~~~~~~~~~~~~">
-        <location
-            file="src/test/kotlin/androidx/compose/ui/autofill/AutofillNodeTest.kt"
-            line="60"
-            column="39"/>
-    </issue>
-
-    <issue
-        id="NewApi"
-        message="Call requires API level 26 (current min is 21): `AndroidAutofill`"
-        errorLine1="        androidAutofill = AndroidAutofill(view, autofillTree)"
-        errorLine2="                          ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
-        <location
-            file="src/test/kotlin/androidx/compose/ui/autofill/AutofillNodeTest.kt"
-            line="63"
-            column="27"/>
-    </issue>
-
-    <issue
-        id="NewApi"
-        message="Call requires API level 26 (current min is 21): `android.view.View#getImportantForAutofill`"
-        errorLine1="        assertThat(view.importantForAutofill).isEqualTo(View.IMPORTANT_FOR_AUTOFILL_YES)"
-        errorLine2="                        ~~~~~~~~~~~~~~~~~~~~">
-        <location
-            file="src/test/kotlin/androidx/compose/ui/autofill/AutofillNodeTest.kt"
-            line="74"
-            column="25"/>
-    </issue>
-
-    <issue
-        id="NewApi"
-        message="Call requires API level 26 (current min is 21): `requestAutofillForNode`"
-        errorLine1="        androidAutofill.requestAutofillForNode(autofillNode)"
-        errorLine2="                        ~~~~~~~~~~~~~~~~~~~~~~">
-        <location
-            file="src/test/kotlin/androidx/compose/ui/autofill/AutofillNodeTest.kt"
-            line="84"
-            column="25"/>
-    </issue>
-
-    <issue
-        id="NewApi"
-        message="Call requires API level 26 (current min is 21): `requestAutofillForNode`"
-        errorLine1="        androidAutofill.requestAutofillForNode(autofillNode)"
-        errorLine2="                        ~~~~~~~~~~~~~~~~~~~~~~">
-        <location
-            file="src/test/kotlin/androidx/compose/ui/autofill/AutofillNodeTest.kt"
-            line="101"
-            column="25"/>
-    </issue>
-
-    <issue
-        id="NewApi"
-        message="Call requires API level 26 (current min is 21): `cancelAutofillForNode`"
-        errorLine1="        androidAutofill.cancelAutofillForNode(autofillNode)"
-        errorLine2="                        ~~~~~~~~~~~~~~~~~~~~~">
-        <location
-            file="src/test/kotlin/androidx/compose/ui/autofill/AutofillNodeTest.kt"
-            line="110"
-            column="25"/>
-    </issue>
-
-    <issue
-        id="NewApi"
         message="Call requires API level 26 (current min is 21): `waitAndScreenShot`"
         errorLine1="        val bitmap = rule.waitAndScreenShot()"
         errorLine2="                          ~~~~~~~~~~~~~~~~~">
@@ -728,14 +310,14 @@
     </issue>
 
     <issue
-        id="MissingTestSizeAnnotation"
-        message="Missing test size annotation"
-        errorLine1="    fun setContentViewCalledMultipleTimes(): Unit = runBlocking {"
-        errorLine2="        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+        id="VisibleForTests"
+        message="This method should only be accessed from tests or within private scope"
+        errorLine1="        ic?.mTextFieldValue = newValue"
+        errorLine2="            ~~~~~~~~~~~~~~~">
         <location
-            file="src/androidAndroidTest/kotlin/androidx/compose/ui/platform/WindowRecomposerTest.kt"
-            line="145"
-            column="9"/>
+            file="src/androidMain/kotlin/androidx/compose/ui/text/input/TextInputServiceAndroid.android.kt"
+            line="207"
+            column="13"/>
     </issue>
 
 </issues>
diff --git a/development/update_studio.sh b/development/update_studio.sh
index 235344c..78120a7 100755
--- a/development/update_studio.sh
+++ b/development/update_studio.sh
@@ -1,7 +1,7 @@
 #!/bin/bash
 # Get versions
-AGP_VERSION=${1:-7.2.0-alpha06}
-STUDIO_VERSION_STRING=${2:-"Android Studio Chipmunk (2021.2.1) Canary 6"}
+AGP_VERSION=${1:-7.2.0-alpha07}
+STUDIO_VERSION_STRING=${2:-"Android Studio Chipmunk (2021.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"`
@@ -26,8 +26,6 @@
 sed -i "s/androidLint = \".*/androidLint = \"$LINT_VERSION\"/g" gradle/libs.versions.toml
 sed -i "s/androidStudio = .*/androidStudio = \"$STUDIO_VERSION\"/g" gradle/libs.versions.toml
 
-exit 1
-
 # Pull all UTP artifacts for ADT version
 ADT_VERSION=${3:-$LINT_VERSION}
 curl -sL "https://dl.google.com/android/maven2/com/android/tools/utp/group-index.xml" \
diff --git a/glance/glance-appwidget/lint-baseline.xml b/glance/glance-appwidget/lint-baseline.xml
new file mode 100644
index 0000000..359cd45
--- /dev/null
+++ b/glance/glance-appwidget/lint-baseline.xml
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<issues format="6" by="lint 7.2.0-alpha07" type="baseline" client="gradle" dependencies="false" name="AGP (7.2.0-alpha07)" variant="all" version="7.2.0-alpha07">
+
+    <issue
+        id="VisibleForTests"
+        message="This method should only be accessed from tests or within private scope"
+        errorLine1="            previous || (itemId > ReservedItemIdRangeEnd)"
+        errorLine2="                                  ~~~~~~~~~~~~~~~~~~~~~~">
+        <location
+            file="src/androidMain/kotlin/androidx/glance/appwidget/translators/LazyListTranslator.kt"
+            line="86"
+            column="35"/>
+    </issue>
+
+</issues>
diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml
index 8bce553d..942a457e 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 = "7.2.0-alpha06"
+androidGradlePlugin = "7.2.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 = "30.2.0-alpha06"
+androidLint = "30.2.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 = "2021.2.1.6"
+androidStudio = "2021.2.1.7"
 # -----------------------------------------------------------------------------
 
 androidLintMin = "27.2.1"
diff --git a/lint-checks/src/main/java/androidx/build/lint/ClassVerificationFailureDetector.kt b/lint-checks/src/main/java/androidx/build/lint/ClassVerificationFailureDetector.kt
index b8da452..18e726e 100644
--- a/lint-checks/src/main/java/androidx/build/lint/ClassVerificationFailureDetector.kt
+++ b/lint-checks/src/main/java/androidx/build/lint/ClassVerificationFailureDetector.kt
@@ -768,6 +768,7 @@
             return null
         }
 
+        @Suppress("DEPRECATION") // usage of getAllAnnotations b/214311882
         private fun getRequiresApiFromAnnotations(modifierListOwner: PsiModifierListOwner): Int {
             for (annotation in context.evaluator.getAllAnnotations(modifierListOwner, false)) {
                 val qualifiedName = annotation.qualifiedName
diff --git a/wear/watchface/watchface/lint-baseline.xml b/wear/watchface/watchface/lint-baseline.xml
index 28abbba..0d84118 100644
--- a/wear/watchface/watchface/lint-baseline.xml
+++ b/wear/watchface/watchface/lint-baseline.xml
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<issues format="6" by="lint 7.1.0-beta02" type="baseline" client="gradle" dependencies="false" name="AGP (7.1.0-beta02)" variant="all" version="7.1.0-beta02">
+<issues format="6" by="lint 7.2.0-alpha07" type="baseline" client="gradle" dependencies="false" name="AGP (7.2.0-alpha07)" variant="all" version="7.2.0-alpha07">
 
     <issue
         id="MissingClass"
@@ -63,7 +63,7 @@
         errorLine2="                              ~~~~">
         <location
             file="src/main/java/androidx/wear/watchface/WatchFaceService.kt"
-            line="1926"
+            line="2243"
             column="31"/>
     </issue>
 
@@ -74,11 +74,99 @@
         errorLine2="        ^">
         <location
             file="src/test/java/androidx/wear/watchface/TestCommon.kt"
-            line="92"
+            line="100"
             column="9"/>
     </issue>
 
     <issue
+        id="VisibleForTests"
+        message="This method should only be accessed from tests or within private scope"
+        errorLine1="            complicationSlotsManager.watchState,"
+        errorLine2="                                     ~~~~~~~~~~">
+        <location
+            file="src/main/java/androidx/wear/watchface/ComplicationSlot.kt"
+            line="267"
+            column="38"/>
+    </issue>
+
+    <issue
+        id="VisibleForTests"
+        message="This method should only be accessed from tests or within private scope"
+        errorLine1="                val watchFaceImpl = engineCopy.deferredWatchFaceImpl.await()"
+        errorLine2="                                               ~~~~~~~~~~~~~~~~~~~~~">
+        <location
+            file="src/main/java/androidx/wear/watchface/control/HeadlessWatchFaceImpl.kt"
+            line="84"
+            column="48"/>
+    </issue>
+
+    <issue
+        id="VisibleForTests"
+        message="This method should only be accessed from tests or within private scope"
+        errorLine1="                            if (engine.deferredWatchFaceImpl.isCompleted) {"
+        errorLine2="                                       ~~~~~~~~~~~~~~~~~~~~~">
+        <location
+            file="src/main/java/androidx/wear/watchface/control/InteractiveInstanceManager.kt"
+            line="125"
+            column="40"/>
+    </issue>
+
+    <issue
+        id="VisibleForTests"
+        message="This method should only be accessed from tests or within private scope"
+        errorLine1="                    val watchFaceImpl = engineCopy.deferredWatchFaceImpl.await()"
+        errorLine2="                                                   ~~~~~~~~~~~~~~~~~~~~~">
+        <location
+            file="src/main/java/androidx/wear/watchface/control/InteractiveWatchFaceImpl.kt"
+            line="61"
+            column="52"/>
+    </issue>
+
+    <issue
+        id="VisibleForTests"
+        message="This method should only be accessed from tests or within private scope"
+        errorLine1="                    it.deferredWatchFaceImpl.await()"
+        errorLine2="                       ~~~~~~~~~~~~~~~~~~~~~">
+        <location
+            file="src/main/java/androidx/wear/watchface/control/InteractiveWatchFaceImpl.kt"
+            line="144"
+            column="24"/>
+    </issue>
+
+    <issue
+        id="VisibleForTests"
+        message="This method should only be accessed from tests or within private scope"
+        errorLine1="                return engine.deferredWatchFaceImpl.await().WFEditorDelegate()"
+        errorLine2="                              ~~~~~~~~~~~~~~~~~~~~~">
+        <location
+            file="src/main/java/androidx/wear/watchface/WatchFace.kt"
+            line="213"
+            column="31"/>
+    </issue>
+
+    <issue
+        id="VisibleForTests"
+        message="This method should only be accessed from tests or within private scope"
+        errorLine1="                return engine.deferredWatchFaceImpl.await().WFEditorDelegate()"
+        errorLine2="                              ~~~~~~~~~~~~~~~~~~~~~">
+        <location
+            file="src/main/java/androidx/wear/watchface/WatchFace.kt"
+            line="213"
+            column="31"/>
+    </issue>
+
+    <issue
+        id="VisibleForTests"
+        message="This method should only be accessed from tests or within private scope"
+        errorLine1="                complicationSlotsManager.watchState = watchState"
+        errorLine2="                                         ~~~~~~~~~~">
+        <location
+            file="src/main/java/androidx/wear/watchface/WatchFaceService.kt"
+            line="1706"
+            column="42"/>
+    </issue>
+
+    <issue
         id="ClassVerificationFailure"
         message="This call references a method added in API level 30; however, the containing class androidx.wear.watchface.WatchFaceImpl is reachable from earlier API levels and will fail run-time class verification."
         errorLine1="            renderer.surfaceHolder.surface.setFrameRate("