Status Update
Comments
ma...@gmail.com <ma...@gmail.com> #2
Maybe a dup of
je...@google.com <je...@google.com>
je...@google.com <je...@google.com> #3
Android Gradle Plugin: 8.7.1
Could you try the latest canary, AGP 8.8.0-alpha09
?
je...@google.com <je...@google.com> #4
I just updated to Android Gradle Plugin: 8.7.2 and the bug is fixed.
an...@google.com <an...@google.com> #5
I spoke too soon. The bug appears gone when I use a different computer, but that is only because the lint check is disabled on it. The computer with the false positive is a new cloning of my github project which apparently has the lint check enabled. The AGP 8.8.0-alpha09 plugin will not work on ladybug, and I'm too busy to switch to a canary build of android studio just to fix a false positive lint check, sorry.
je...@google.com <je...@google.com> #6
I just tried running lint on two more of my computers, one which also has a fresh clone of the github project, and one which has an "ancient" (but up to date) clone of the project -- the two computers have very different Settings -> Editor -> Inspections choices. The old clones do not have this lint check anywhere in their choices, whereas new clones do. Very odd indeed. (I have .idea/ in my .gitignore BTW).
Description
SourceDirectories.addGeneratedSourceDirectory
works the same way as the artifact API and takes over the output for the tasks. For example in thetoml/gen
), running the verification task shows that the location is changed tobuild/generated/toml/debugAddCustomSources
.It does in fact work if you pass this to multiple variants. For instance changing the recipe to something like this:
will in fact works. However the look of the API make it looks like it would not work.
Part of this is the way some of our other APIs work (for example transforms on Artifact are very variant specific).
At the very least we should document that it can in fact be used for multiple variantss. We should also consider making it more obvious (maybe the API just needs to receive a
Provider<Directory>
, though I think there are potentially issue as the location should be inbuild/
?)