Status Update
Comments
au...@google.com <au...@google.com> #3
Thank you for your patience while our engineering team worked to resolve this issue. A fix for this issue is now available in:
- Android Studio Giraffe Canary 1 (2022.3.1.1)
- Android Gradle Plugin 8.1.0
We encourage you to try the latest update.
If you notice further issues or have questions, please file a new bug report.
Thank you for taking the time to submit feedback — we really appreciate it!
sp...@google.com <sp...@google.com> #4
Still on the radar, but no update
sp...@google.com <sp...@google.com> #5
Now that we have the updateLintBaseline
task, we should encourage users to use it by doing the following:
Update the with instructions for running the task.lint error message Update the .lint user guide Update the .documentation on DAC Add AGP release notes about the change.
All of the above changes should be added for AGP 8.0 (no functional changes... mostly just documentation of the existing feature).
Proposed schedule for future AGP releases:
- (AGP 8.1) Warn users when they run lint with a lint baseline file set in the DSL but the file doesn't exist
- unless android.experimental.lint.missingBaselineIsEmptyBaseline=true
- (AGP 9.0) Error instead of warning
- remove lint baseline as output of lint task
Edit: removed the proposed breaking change because Change-Id: I818e5812d8a4b45a1024618ecaec399439569dfc
removed the lint baseline as an output without the need for the breaking change.
sp...@google.com <sp...@google.com> #6
Closing this bug because the baseline file is no longer an output.
Created
Description
AndroidLintTask
lists the lint baseline file (e.g.lint-baseline.xml
) as an@InputFiles
property, but the file is also functioning as an@Output
of the task, since Lint, as documentedThis isn't good practice in Gradle, and leads to some odd behavior.
For instance, if you:
gradlew app:lint -Dlint.baselines.continue=true
, generating a new baseline filegradlew app:lint -Dlint.baselines.continue=true
The baseline file is not re-created, since Gradle observes the same "before" state for both invocations and marks the task as
Up-To-Date
(Gradle doesn't include the file in the "after" snapshot for the task because the file isn't marked as an@Output
). A fix/workaround is pending for this particular issue, but there may be other issues inherent to this non-idiomatic use of the Gradle API.This comment proposes a fix in AGP for the broader issue.