Fixed
Status Update
Comments
ag...@google.com <ag...@google.com>
ga...@google.com <ga...@google.com> #2
Let's do this in AGP 7.4 so that we don't get warnings with Gradle 8.0 and AGP 7.4.
bi...@google.com <bi...@google.com>
bi...@google.com <bi...@google.com> #3
The new way of setting output location is via getOutputLocation
which returns a provider not a property, how can I call set for it?
ref:
tt...@gradle.com <tt...@gradle.com> #4
The `getOutputLocation` method on the `Report` interface, which is the only method available on `ConfigurableReport` does return only a `Provider`, this is true.
However, in `DirectoryReport`, `SimpleReport` or `SingleFileReport`, which specialize that interface and are likely to be the actual types a client would be interested in implementing, the return type is narrowed to various kinds of `Property`s. Is using/casting to one of these specialized interfaces a problem for you?
After a quick look, I don't think there is a reason why `Report` shouldn't return a `Property` - output location is clearly meant to be able to be set for any type of report. I will look into possibly changing this for Gradle 8.0.
However, in `DirectoryReport`, `SimpleReport` or `SingleFileReport`, which specialize that interface and are likely to be the actual types a client would be interested in implementing, the return type is narrowed to various kinds of `Property`s. Is using/casting to one of these specialized interfaces a problem for you?
After a quick look, I don't think there is a reason why `Report` shouldn't return a `Property` - output location is clearly meant to be able to be set for any type of report. I will look into possibly changing this for Gradle 8.0.
bi...@google.com <bi...@google.com> #5
Thanks for the reply, we were using ConfigurableReport
but actually we can just use subclasses which has that property.
bi...@google.com <bi...@google.com> #6
fixed with I4f14bae15ecc20b8525c9c947cb6dae4a2b79332
Description
Per the javadoc on that method, please switch to using the outputLocation property to avoid these warnings and prepare for it's removal in Gradle 9.0.