Status Update
Comments
tn...@google.com <tn...@google.com> #2
Actually, I think is because I had tried turning on the build profileable apps flag, PROFILEABLE_BUILDS
, in my environment.
It seems to have a side effect of changing regular build operations (I don't think that's intentional).
I created a new compose project. When I build the project, without the build-profileable-apps studio flag set, here's how the tasks output from running the app ends:
> Task :app:packageDebug
> Task :app:createDebugApkListingFileRedirect
> Task :app:assembleDebug
BUILD SUCCESSFUL in 7s
33 actionable tasks: 33 executed
Then I clean the project, and turn on the build-profileable-apps flag, and run again.
Now I get this output:
> Task :app:packageDebug
> Task :app:createDebugApkListingFileRedirect UP-TO-DATE
> Task :app:lintVitalAnalyzeDebug
> Task :app:lintVitalReportDebug
> Task :app:lintVitalDebug
> Task :app:assembleDebug
The lintVital tasks here should not be included; this means that AGP is treating this like a release build.
But note that I my variant is still set to debug, and I haven't clicked on the profiler drop down or anything; it seems to have a side effect for regular build/run which I don't think is intentional.
yi...@google.com <yi...@google.com>
yi...@google.com <yi...@google.com> #3
1. Run config persists the profilingMode flag even when not profiling:
2. Even if -Pandroid.profilingMode=profileable is set, it shouldn't affect the lintVital targets. Luke, do you know why that happens?
lu...@google.com <lu...@google.com> #4
Regarding #3 problem 2, it looks like registering the lint vital tasks happens if debuggable is disabled (probably assuming a release build). However, with profileable enabled, debuggable is disabled. So this can fixed by only registering the tasks only if both debuggable and profileable are disabled (LintTaskmanager:123).
Description
I was building a sample project with 7.3 dev, and as I was trying to run the app, the build failed with a lint error. I was not expecting this, because the current variant is a debug variant, and lintVital should only be running on release variants. See screenshot. The test project ishttps://github.com/android/architecture-samples though I have some local tweaks (but not to the variants setup).
Build: AI-213.7172.25.2113.SNAPSHOT, 202204011615,
AI-213.7172.25.2113.SNAPSHOT, JRE 11.0.13+0-b1751.21-8125866x64 JetBrains s.r.o., OS Mac OS X(aarch64) v12.3.1, screens 3456.0x2234.0; Retina
AS: dev build; Kotlin plugin: 213-1.6.20-M1-release-for-android-studio-AS6777.52; Android Gradle Plugin: 7.3.0-alpha07; Gradle: 7.4; Gradle JDK: version 11.0.13; NDK: from local.properties: (not specified), latest from SDK: (not found); LLDB: pinned revision 3.1 not found, latest from SDK: (package not found); CMake: from local.properties: (not specified), latest from SDK: (not found), from PATH: (not found)
IMPORTANT: Please readhttps://developer.android.com/studio/report-bugs.html carefully and supply all required information.