Clone
Adam Murdoch
committed
on 25 Feb 19
Do not allow `@CacheableTask` to be attached to types that are not `Task` subtypes or `@CacheableTransformAction` to be attached to types th… Show more
Do not allow `@CacheableTask` to be attached to types that are not `Task` subtypes or `@CacheableTransformAction` to be attached to types that are not `TransformAction` subtypes.

The check is performed as part of constructing the `TypeMetadata` for a given type, so is currently only applied for those things that use this. This includes tasks, artifact transform parameters, artifact transform actions, and types that are statically reachable via `@Nested` properties. For tasks, the result of the check is visible as an error (not warning) in the output of `ValidateTaskProperties` for tasks and is also an error at runtime (yes, at runtime). For artifact transforms, the result is visible as an error at runtime. This is intended to be a step towards making the result of all checks visible both at runtime and plugin build time for tasks and all other types.

Show less