ArtifactTransformValuesInjectionTest.groovy

Clone Tools
  • last updated a few seconds ago
Constraints
Constraints: committers
 
Constraints: files
Constraints: dates
Add more validation of inject annotations.

- Don't allow an inject annotation on any method of a type for which it is not relevant, e.g. `@Workspace` on a `Task` (was only applied to getters previously).

- Don't allow multiple inject annotations on the same getter (received a cryptic error message previously).

- Don't allow inject annotations on private methods, setter methods, static methods and getter methods that cannot be overridden (was applied only to `@Inject` previously).

- Don't allow inject annotations on methods of `ExtensionAware` (received a cryptic error message previously).

    • -200
    • +0
    ./ArtifactTransformValuesInjectionTest.groovy
  1. … 7 more files in changeset.
Add a mechanism to register injection annotations globally and use this to validate that annotations are not attached to types where they are not supported. For example, fail when `@Workspace` is attached to a task property getter.

    • -1
    • +24
    ./ArtifactTransformValuesInjectionTest.groovy
  1. … 20 more files in changeset.
Add `@PrimaryInput` annotation, which can be attached to a getter of an artifact transform to receive the artifact to be transformed.

    • -3
    • +10
    ./ArtifactTransformValuesInjectionTest.groovy
  1. … 3 more files in changeset.
Change class generation to locate services based on the annotation attached to the property getter. This means that for artifact transforms, the workspace is not available via `@Inject` and the dependencies are not available via `@Workspace`.

    • -0
    • +170
    ./ArtifactTransformValuesInjectionTest.groovy
  1. … 8 more files in changeset.