Skip to content

Commit

Permalink
Merge "Upgrade to AGP 7.3.0-alpha05" into androidx-main
Browse files Browse the repository at this point in the history
  • Loading branch information
liutikas authored and Gerrit Code Review committed Mar 15, 2022
2 parents 962bb62 + e4d2728 commit a967b37
Show file tree
Hide file tree
Showing 13 changed files with 667 additions and 296 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,22 @@ val DONT_TRY_RERUNNING_TASKS = setOf(
"lintTargetSdk30Debug",
"lintTargetSdkLatestDebug",

// b/223287425
"lintReportWithKaptDebug",
"lintAnalyzeWithKaptDebug",
"lintReportWithKspDebug",
"lintAnalyzeWithKspDebug",
"lintReportTargetSdk29Debug",
"lintAnalyzeTargetSdk29Debug",
"lintReportTargetSdk30Debug",
"lintAnalyzeTargetSdk30Debug",
"lintReportTargetSdkLatestDebug",
"lintAnalyzeTargetSdkLatestDebug",
"lintReportWithNullAwareTypeConverterDebug",
"lintAnalyzeWithNullAwareTypeConverterDebug",
"lintReportWithoutExpandProjectionDebug",
"lintAnalyzeWithoutExpandProjectionDebug",

// We know that these tasks are never up to date due to maven-metadata.xml changing
// https://github.com/gradle/gradle/issues/11203
"partiallyDejetifyArchive",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ abstract class SdkResourceGenerator : DefaultTask() {
abstract val debugKeystore: RegularFileProperty

@get:Input
val compileSdkVersion: Int = SupportConfig.TARGET_SDK_VERSION
val compileSdkVersion: String = SupportConfig.COMPILE_SDK_VERSION

@get:Input
val buildToolsVersion: String = SupportConfig.BUILD_TOOLS_VERSION
Expand Down
420 changes: 397 additions & 23 deletions camera/camera-camera2/lint-baseline.xml

Large diffs are not rendered by default.

101 changes: 100 additions & 1 deletion camera/camera-extensions/lint-baseline.xml
Original file line number Diff line number Diff line change
@@ -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.3.0-alpha05" type="baseline" client="gradle" dependencies="false" name="AGP (7.3.0-alpha05)" variant="all" version="7.3.0-alpha05">

<issue
id="UnsafeOptInUsageError"
Expand All @@ -23,6 +23,28 @@
column="41"/>
</issue>

<issue
id="UnsafeOptInUsageError"
message="This declaration is opt-in and its usage should be marked with&#xA;&apos;@androidx.camera.camera2.interop.ExperimentalCamera2Interop&apos; or &apos;@OptIn(markerClass = androidx.camera.camera2.interop.ExperimentalCamera2Interop.class)&apos;"
errorLine1=" camera2ConfigurationBuilder.setCaptureRequestOption(captureParameter.first,"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/camera/extensions/internal/AdaptingCaptureStage.java"
line="43"
column="65"/>
</issue>

<issue
id="UnsafeOptInUsageError"
message="This declaration is opt-in and its usage should be marked with&#xA;&apos;@androidx.camera.camera2.interop.ExperimentalCamera2Interop&apos; or &apos;@OptIn(markerClass = androidx.camera.camera2.interop.ExperimentalCamera2Interop.class)&apos;"
errorLine1=" captureParameter.second);"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/camera/extensions/internal/AdaptingCaptureStage.java"
line="44"
column="21"/>
</issue>

<issue
id="UnsafeOptInUsageError"
message="This declaration is opt-in and its usage should be marked with&#xA;&apos;@androidx.camera.camera2.interop.ExperimentalCamera2Interop&apos; or &apos;@OptIn(markerClass = androidx.camera.camera2.interop.ExperimentalCamera2Interop.class)&apos;"
Expand All @@ -45,6 +67,17 @@
column="47"/>
</issue>

<issue
id="UnsafeOptInUsageError"
message="This declaration is opt-in and its usage should be marked with&#xA;&apos;@androidx.camera.camera2.interop.ExperimentalCamera2Interop&apos; or &apos;@OptIn(markerClass = androidx.camera.camera2.interop.ExperimentalCamera2Interop.class)&apos;"
errorLine1=" CaptureRequestOptions.Builder.from(parameters).build();"
errorLine2=" ~~~~~~~~~~">
<location
file="src/main/java/androidx/camera/extensions/internal/sessionprocessor/AdvancedSessionProcessor.java"
line="120"
column="52"/>
</issue>

<issue
id="UnsafeOptInUsageError"
message="This declaration is opt-in and its usage should be marked with&#xA;&apos;@androidx.camera.camera2.interop.ExperimentalCamera2Interop&apos; or &apos;@OptIn(markerClass = androidx.camera.camera2.interop.ExperimentalCamera2Interop.class)&apos;"
Expand Down Expand Up @@ -78,6 +111,28 @@
column="38"/>
</issue>

<issue
id="UnsafeOptInUsageError"
message="This declaration is opt-in and its usage should be marked with&#xA;&apos;@androidx.camera.camera2.interop.ExperimentalCamera2Interop&apos; or &apos;@OptIn(markerClass = androidx.camera.camera2.interop.ExperimentalCamera2Interop.class)&apos;"
errorLine1=" camera2ConfigBuilder.setCaptureRequestOption(objKey,"
errorLine2=" ~~~~~~">
<location
file="src/main/java/androidx/camera/extensions/internal/sessionprocessor/AdvancedSessionProcessor.java"
line="267"
column="62"/>
</issue>

<issue
id="UnsafeOptInUsageError"
message="This declaration is opt-in and its usage should be marked with&#xA;&apos;@androidx.camera.camera2.interop.ExperimentalCamera2Interop&apos; or &apos;@OptIn(markerClass = androidx.camera.camera2.interop.ExperimentalCamera2Interop.class)&apos;"
errorLine1=" implRequest.getParameters().get(objKey));"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/camera/extensions/internal/sessionprocessor/AdvancedSessionProcessor.java"
line="268"
column="25"/>
</issue>

<issue
id="UnsafeOptInUsageError"
message="This declaration is opt-in and its usage should be marked with&#xA;&apos;@androidx.camera.camera2.interop.ExperimentalCamera2Interop&apos; or &apos;@OptIn(markerClass = androidx.camera.camera2.interop.ExperimentalCamera2Interop.class)&apos;"
Expand All @@ -100,6 +155,17 @@
column="13"/>
</issue>

<issue
id="UnsafeOptInUsageError"
message="This declaration is opt-in and its usage should be marked with&#xA;&apos;@androidx.camera.camera2.interop.ExperimentalCamera2Interop&apos; or &apos;@OptIn(markerClass = androidx.camera.camera2.interop.ExperimentalCamera2Interop.class)&apos;"
errorLine1=" new Camera2ImplConfig.Extender&lt;>(builder).setCameraEventCallback("
errorLine2=" ~~~~~~~">
<location
file="src/main/java/androidx/camera/extensions/internal/ImageCaptureConfigProvider.java"
line="112"
column="46"/>
</issue>

<issue
id="UnsafeOptInUsageError"
message="This declaration is opt-in and its usage should be marked with&#xA;&apos;@androidx.camera.camera2.interop.ExperimentalCamera2Interop&apos; or &apos;@OptIn(markerClass = androidx.camera.camera2.interop.ExperimentalCamera2Interop.class)&apos;"
Expand All @@ -111,6 +177,17 @@
column="55"/>
</issue>

<issue
id="UnsafeOptInUsageError"
message="This declaration is opt-in and its usage should be marked with&#xA;&apos;@androidx.camera.camera2.interop.ExperimentalCamera2Interop&apos; or &apos;@OptIn(markerClass = androidx.camera.camera2.interop.ExperimentalCamera2Interop.class)&apos;"
errorLine1=" new CameraEventCallbacks(imageCaptureEventAdapter));"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/camera/extensions/internal/ImageCaptureConfigProvider.java"
line="113"
column="21"/>
</issue>

<issue
id="UnsafeOptInUsageError"
message="This declaration is opt-in and its usage should be marked with&#xA;&apos;@androidx.camera.camera2.interop.ExperimentalCamera2Interop&apos; or &apos;@OptIn(markerClass = androidx.camera.camera2.interop.ExperimentalCamera2Interop.class)&apos;"
Expand All @@ -122,6 +199,17 @@
column="13"/>
</issue>

<issue
id="UnsafeOptInUsageError"
message="This declaration is opt-in and its usage should be marked with&#xA;&apos;@androidx.camera.camera2.interop.ExperimentalCamera2Interop&apos; or &apos;@OptIn(markerClass = androidx.camera.camera2.interop.ExperimentalCamera2Interop.class)&apos;"
errorLine1=" new Camera2ImplConfig.Extender&lt;>(builder).setCameraEventCallback("
errorLine2=" ~~~~~~~">
<location
file="src/main/java/androidx/camera/extensions/internal/PreviewConfigProvider.java"
line="112"
column="46"/>
</issue>

<issue
id="UnsafeOptInUsageError"
message="This declaration is opt-in and its usage should be marked with&#xA;&apos;@androidx.camera.camera2.interop.ExperimentalCamera2Interop&apos; or &apos;@OptIn(markerClass = androidx.camera.camera2.interop.ExperimentalCamera2Interop.class)&apos;"
Expand All @@ -133,4 +221,15 @@
column="55"/>
</issue>

<issue
id="UnsafeOptInUsageError"
message="This declaration is opt-in and its usage should be marked with&#xA;&apos;@androidx.camera.camera2.interop.ExperimentalCamera2Interop&apos; or &apos;@OptIn(markerClass = androidx.camera.camera2.interop.ExperimentalCamera2Interop.class)&apos;"
errorLine1=" new CameraEventCallbacks(previewEventAdapter));"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/camera/extensions/internal/PreviewConfigProvider.java"
line="113"
column="21"/>
</issue>

</issues>
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ 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.intellij.lang.annotations.Language
import org.junit.Ignore
import org.junit.runners.Parameterized

/* ktlint-disable max-line-length */
Expand Down Expand Up @@ -113,6 +114,7 @@ class UnnecessaryLambdaCreationDetectorTest(
.run()
}

@Ignore("b/223287425")
@Test
fun warnsForSingleExpressions() {
check(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -139,13 +139,13 @@ private fun ensureIconsExistInAllThemes(icons: List<Icon>) {
}

val expectedIconNames = groupedIcons.values.map { themeIcons ->
themeIcons.map { icon -> icon.kotlinName }
themeIcons.map { icon -> icon.kotlinName }.sorted()
}

expectedIconNames.first().let { expected ->
expectedIconNames.forEach { actual ->
check(actual == expected) {
"Not all icons were found in all themes"
"Not all icons were found in all themes $actual $expected"
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ import androidx.compose.lint.test.Stubs
import com.android.tools.lint.checks.infrastructure.LintDetectorTest
import com.android.tools.lint.detector.api.Detector
import com.android.tools.lint.detector.api.Issue
import org.junit.Ignore
import org.junit.Test
import org.junit.runner.RunWith
import org.junit.runners.JUnit4
Expand All @@ -38,6 +39,7 @@ class RememberDetectorTest : LintDetectorTest() {
override fun getIssues(): MutableList<Issue> =
mutableListOf(RememberDetector.RememberReturnType)

@Ignore("b/223287425")
@Test
fun returnsUnit() {
lint().files(
Expand Down Expand Up @@ -162,6 +164,7 @@ src/androidx/compose/runtime/foo/FooState.kt:69: Error: remember calls must not
)
}

@Ignore("b/223287425")
@Test
fun returnsValue_explicitUnitType() {
lint().files(
Expand Down
5 changes: 5 additions & 0 deletions development/build_log_simplifier/messages.ignore
Original file line number Diff line number Diff line change
Expand Up @@ -601,3 +601,8 @@ at org\.jetbrains\.kotlin\.gradle\.tasks\.AbstractKotlinCompile\.executeImpl\(Ta
at org\.jetbrains\.kotlin\.gradle\.tasks\.AbstractKotlinCompile\.execute\(Tasks\.kt:[0-9]+\)
# Gradle will log if you are not authenticated to upload scans
A build scan was not published as you have not authenticated with server 'ge\.androidx\.dev'\.
# > Task :core:core:processDebugAndroidTestManifest
package=".*" found in source AndroidManifest\.xml: .*/AndroidManifest\.xml\.
Setting the namespace via a source AndroidManifest\.xml's package attribute is deprecated\.
Please instead set the namespace \(or testNamespace\) in the module's build\.gradle file, as described here: https://developer\.android\.com/studio/build/configure\-app\-module\#set\-namespace
This migration can be done automatically using the AGP Upgrade Assistant, please refer to https://developer\.android\.com/studio/build/agp\-upgrade\-assistant for more information\.
4 changes: 2 additions & 2 deletions development/update_studio.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/bash
# Get versions
AGP_VERSION=${1:-7.3.0-alpha03}
STUDIO_VERSION_STRING=${2:-"Android Studio Dolphin (2021.3.1) Canary 3"}
AGP_VERSION=${1:-7.3.0-alpha05}
STUDIO_VERSION_STRING=${2:-"Android Studio Dolphin (2021.3.1) Canary 5"}
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"`
Expand Down
13 changes: 12 additions & 1 deletion fragment/fragment/lint-baseline.xml
Original file line number Diff line number Diff line change
@@ -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.3.0-alpha05" type="baseline" client="gradle" dependencies="false" name="AGP (7.3.0-alpha05)" variant="all" version="7.3.0-alpha05">

<issue
id="ResourceType"
Expand Down Expand Up @@ -287,4 +287,15 @@
column="20"/>
</issue>

<issue
id="ObsoleteSdkInt"
message="Unnecessary; SDK_INT is always >= 21 from outer annotation (`@RequiresApi(21)`)"
errorLine1=" @RequiresApi(19)"
errorLine2=" ~~~~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/fragment/app/FragmentTransitionCompat21.java"
line="361"
column="5"/>
</issue>

</issues>
6 changes: 3 additions & 3 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@
# -----------------------------------------------------------------------------
# All of the following should be updated in sync.
# -----------------------------------------------------------------------------
androidGradlePlugin = "7.3.0-alpha03"
androidGradlePlugin = "7.3.0-alpha05"
# 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.3.0-alpha03"
androidLint = "30.3.0-alpha05"
# 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.3.1.3"
androidStudio = "2021.3.1.5"
# -----------------------------------------------------------------------------

androidGradlePluginMin = "7.0.4"
Expand Down
Loading

0 comments on commit a967b37

Please sign in to comment.