Closed StylianosGakis closed 1 year ago
Thanks to reporting this issue!
This is a behavior change from v1.4.0 for supporting AGP 8 (#86), but I think this behavior is not suitable as you mentioned it.
I have fixed this problem by #90, and release v1.4.1. Please check with that version.
steps to reproduce:
./gradlew :sample:tasks
% ./gradlew :sample:tasks
Type-safe project accessors is an incubating feature.
> Task :sample:tasks FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':sample:tasks'.
> Could not create task ':sample:removeUnusedResources'.
> removeUnusedResources lintVariant or rur.lintVariant is not specified
v1.4.1 will report this error on task running:
% ./gradlew :sample:removeUnusedResources
Type-safe project accessors is an incubating feature.
> Task :sample:removeUnusedResources FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':sample:removeUnusedResources'.
> Could not determine lintResultXml file. You should set a lintVariant option or lintResultXml option directly
Wow yes, this looks like exactly the fix I was looking for. I just bumped our project and I no longer get this warning. Thanks a lot for the quick release too!
When doing a gradle sync while I got the plugin applied to my :app module, but without specifying some
removeUnusedResources {}
configuration I get the error:Thing is, the way I run this plugin, as seen from the docs too, is that in my CI I do
./gradlew :app:removeUnusedResources -Prur.lintVariant="debug"
so I pass the lintVariant there already. When running locally I do the same, so I don't need to configure it for running it locally.What do you think is the best approach to avoid getting this error?
lintVariant
isn't specified? (Maybe this would break running it from cli too)What do you think?