Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add annotations for compatibility with Gradle 7.0 (#283)
Summary: (This PR won't compile until #282 or similar is merged) Gradle 7.0 verifies that all the task properties are either inputs or outputs (https://docs.gradle.org/current/userguide/upgrading_version_6.html#task_validation_problems_are_now_errors). From looking at the plugin code I figured all the properties are inputs, although I'm not certain this is 100% correct. For example from what I see `variant: TestVariant` is actually both an input and output, depending on the task, but since the property is declared on the base class it's not a straightforward change to have this accurately annotated. I decided to just add `Input` annotations everywhere because this will at least make the plugin work again. However, it's only because no task declares outputs, and so up-to-date checks are off. This is desired behavior, because Android's connected check tasks are never up-to-date themselves, so screenshot tasks never being up-to-date makes sense too. But please note this would have to be explicitly declared (e.g. with `outputs.upToDateWhen { false }` or by linking the up-to-date check to connected test task) if any task has an `Output` declared in the future. I verified the fix with `./gradlew validatePlugins` task and by running `record` and `verify` tasks on my own project with a locally published snapshot (sample doesn't seem to work with Gradle 7 either). Fixes #281 Pull Request resolved: #283 Reviewed By: sjkirby Differential Revision: D27873668 Pulled By: xiphirx fbshipit-source-id: 783de2ef0e00ce92672921a12a74087a32685e6a
- Loading branch information