CommandLineTaskConfigurerSpec.groovy

Clone Tools
  • last updated a few seconds ago
Constraints
Constraints: committers
 
Constraints: files
Constraints: dates
Introduce a service that takes care of inspecting a type for properties, methods and other metadata. This is a step towards using a single mechanism to discover these things efficiently rather than doing so in a bunch of different ways and multiple times.

In this commit, refactor `ClassInspector` into this service and add some in-memory caching. This class was already used for class generation.

Use this service directly in `ConventionAwareHelper` and remove some ad hoc static caching. This avoids inspecting a type that has just been inspected for class generation when an instance is first created.

Also use this service in `OptionsReader`. While this wasn't a performance problem, this change means more consistent behaviour in how annotations are validated and work with Kotlin and Groovy classes (over time).

    • -4
    • +6
    ./CommandLineTaskConfigurerSpec.groovy
  1. … 30 more files in changeset.
Introduce a service that takes care of inspecting a type for properties, methods and other metadata. This is a step towards using a single mechanism to discover these things efficiently rather than doing so in a bunch of different ways and multiple times.

In this commit, refactor `ClassInspector` into this service and add some in-memory caching. This class was already used for class generation.

Use this service directly in `ConventionAwareHelper` and remove some ad hoc static caching. This avoids inspecting a type that has just been inspected for class generation when an instance is first created.

Also use this service in `OptionsReader`. While this wasn't a performance problem, this change means more consistent behaviour in how annotations are validated and work with Kotlin and Groovy classes (over time).

    • -4
    • +6
    ./CommandLineTaskConfigurerSpec.groovy
  1. … 31 more files in changeset.
Introduce a service that takes care of inspecting a type for properties, methods and other metadata. This is a step towards using a single mechanism to discover these things efficiently rather than doing so in a bunch of different ways and multiple times.

In this commit, refactor `ClassInspector` into this service and add some in-memory caching. This class was already used for class generation.

Use this service directly in `ConventionAwareHelper` and remove some ad hoc static caching. This avoids inspecting a type that has just been inspected for class generation when an instance is first created.

Also use this service in `OptionsReader`. While this wasn't a performance problem, this change means more consistent behaviour in how annotations are validated and work with Kotlin and Groovy classes (over time).

    • -4
    • +6
    ./CommandLineTaskConfigurerSpec.groovy
  1. … 31 more files in changeset.
Introduce a service that takes care of inspecting a type for properties, methods and other metadata. This is a step towards using a single mechanism to discover these things efficiently rather than doing so in a bunch of different ways and multiple times.

In this commit, refactor `ClassInspector` into this service and add some in-memory caching. This class was already used for class generation.

Use this service directly in `ConventionAwareHelper` and remove some ad hoc static caching. This avoids inspecting a type that has just been inspected for class generation when an instance is first created.

Also use this service in `OptionsReader`. While this wasn't a performance problem, this change means more consistent behaviour in how annotations are validated and work with Kotlin and Groovy classes (over time).

    • -4
    • +6
    ./CommandLineTaskConfigurerSpec.groovy
  1. … 31 more files in changeset.
Introduce a service that takes care of inspecting a type for properties, methods and other metadata. This is a step towards using a single mechanism to discover these things efficiently rather than doing so in a bunch of different ways and multiple times.

In this commit, refactor `ClassInspector` into this service and add some in-memory caching. This class was already used for class generation.

Use this service directly in `ConventionAwareHelper` and remove some ad hoc static caching. This avoids inspecting a type that has just been inspected for class generation when an instance is first created.

Also use this service in `OptionsReader`. While this wasn't a performance problem, this change means more consistent behaviour in how annotations are validated and work with Kotlin and Groovy classes (over time).

    • -4
    • +6
    ./CommandLineTaskConfigurerSpec.groovy
  1. … 30 more files in changeset.
Introduce a service that takes care of inspecting a type for properties, methods and other metadata. This is a step towards using a single mechanism to discover these things efficiently rather than doing so in a bunch of different ways and multiple times.

In this commit, refactor `ClassInspector` into this service and add some in-memory caching. This class was already used for class generation.

Use this service directly in `ConventionAwareHelper` and remove some ad hoc static caching. This avoids inspecting a type that has just been inspected for class generation when an instance is first created.

Also use this service in `OptionsReader`. While this wasn't a performance problem, this change means more consistent behaviour in how annotations are validated and work with Kotlin and Groovy classes (over time).

    • -4
    • +6
    ./CommandLineTaskConfigurerSpec.groovy
  1. … 30 more files in changeset.
Introduce a service that takes care of inspecting a type for properties, methods and other metadata. This is a step towards using a single mechanism to discover these things efficiently rather than doing so in a bunch of different ways and multiple times.

In this commit, refactor `ClassInspector` into this service and add some in-memory caching. This class was already used for class generation.

Use this service directly in `ConventionAwareHelper` and remove some ad hoc static caching. This avoids inspecting a type that has just been inspected for class generation when an instance is first created.

Also use this service in `OptionsReader`. While this wasn't a performance problem, this change means more consistent behaviour in how annotations are validated and work with Kotlin and Groovy classes (over time).

    • -4
    • +6
    ./CommandLineTaskConfigurerSpec.groovy
  1. … 31 more files in changeset.
Use ProjectBuilder.builder() instead of deprecated constructor

    • -1
    • +1
    ./CommandLineTaskConfigurerSpec.groovy
  1. … 3 more files in changeset.
Expose public API for defining command line options for tasks (#4040)

    • -1
    • +1
    ./CommandLineTaskConfigurerSpec.groovy
  1. … 41 more files in changeset.
Changed error message on failure converting a string to some enum type so that it lists the actual values that would be accepted as input.

Previously, it reported the `toString()` value for each enum value, but matches on the `name()` value. These can be different.

    • -1
    • +1
    ./CommandLineTaskConfigurerSpec.groovy
  1. … 5 more files in changeset.
Some changes to scalar -> scalar conversion in the model DSL.

- Fail when information would be discarded when converting to a numeric type, and apply this consistently when converting from a `Number` or a `CharSequence` input.

- List the correct set of supported inputs in the error message when attempting to convert from an unsupported input. Previously this information was present in the error messages, but incorrect.

- Tweaks to conversion error messages.

    • -2
    • +1
    ./CommandLineTaskConfigurerSpec.groovy
  1. … 7 more files in changeset.
Replaced TaskExecutionRequest.getTaskName() with getArgs(), so that a request can also transport the options that modify the request, rather than packing each command-line options into a separate request.Also simplified a few internal tasks to work with a sequence of Strings instead of a sequence of TaskExecutionRequest instances.

    • -32
    • +16
    ./CommandLineTaskConfigurerSpec.groovy
  1. … 16 more files in changeset.
Renamed TaskParameter to TaskExecutionRequest.

    • -3
    • +3
    ./CommandLineTaskConfigurerSpec.groovy
  1. … 18 more files in changeset.
Changes to make it ready for build with Gradle 2.0 (codenarc).

    • -0
    • +1
    ./CommandLineTaskConfigurerSpec.groovy
  1. … 13 more files in changeset.
REVIEW-4876 Merge two BuildConfigurationActions.

    • -16
    • +30
    ./CommandLineTaskConfigurerSpec.groovy
  1. … 9 more files in changeset.
Added an exception thrown by NotationParser when the provided value is badly formed.

    • -2
    • +2
    ./CommandLineTaskConfigurerSpec.groovy
  1. … 8 more files in changeset.
REVIEW-3510 change String[] Option.options() to String Option.option()

    • -7
    • +7
    ./CommandLineTaskConfigurerSpec.groovy
  1. … 13 more files in changeset.
REVIEW-3515 move string to enum conversion into a NotationParser

    • -2
    • +4
    ./CommandLineTaskConfigurerSpec.groovy
  1. … 5 more files in changeset.
resolve OptionReader via ServiceRegistry

    • -2
    • +3
    ./CommandLineTaskConfigurerSpec.groovy
  1. … 8 more files in changeset.
Add support for option annotation on fields

- support annotating fields

- defaults to field name when options not set

- move option related methods into seperate package

- cache static information about parsed classes in OptionReader

- TODO move assertion on valid method type into MethodOptionElement

- TODO add assertion on valid option field type into FieldOptionElement

- TODO throw decent exception when option.description not set. currently it's optional

- TODO throw decent exception when option.options not set when annotated on methods

- MAYBE: calculate option name on methods (e.g. setName -> option name name)

    • -1
    • +1
    ./CommandLineTaskConfigurerSpec.groovy
  1. … 26 more files in changeset.
rename commandlineoption annotation to option annotation; to be used for more general purposes than just passing commandline options in the future

    • -8
    • +8
    ./CommandLineTaskConfigurerSpec.groovy
  1. … 23 more files in changeset.
error message for wrong enum value differs on different jvms. fix assertion in testcase and fix windows ci build

    • -1
    • +2
    ./CommandLineTaskConfigurerSpec.groovy
More cleanup on Help for Tasks based on reviews

- REVIEW-3460 add support for enums

- REVIEW-3459 move knowledge from CommandLineTaskConfigurer to CommandLineOptionDescriptor

- knowledge bout option parameters

- how to apply option on tasks

- REVIEW-3459 - dont support '--flag true' just use '--flag' instead

    • -7
    • +44
    ./CommandLineTaskConfigurerSpec.groovy
  1. … 10 more files in changeset.
Removed some special cases from build failure reporting:

- BuildExceptionReporter no longer knows anything about TaskSelectionException.

- DefaultExceptionAnalyser no longer knows anything about FailureResolutionAware.

- Changed LocationAwareException so that it is FailureResolutionAware, and just delegates to its cause.

- Changed CommandLineTaskConfigurer so that it does not include the cause error message in the TaskConfigurationException message.

    • -12
    • +10
    ./CommandLineTaskConfigurerSpec.groovy
  1. … 8 more files in changeset.
Remove @author tags and names from source code.

- Added checkstyle check for @author

- Added not to CONTRIBUTING.md saying that we don't use names in the codebase

    • -3
    • +0
    ./CommandLineTaskConfigurerSpec.groovy
  1. … 1213 more files in changeset.
REVIEW-485 Removed explicit validation of short options for the task command line options. We'll have a much better solution soon.

    • -2
    • +1
    ./CommandLineTaskConfigurerSpec.groovy
  1. … 5 more files in changeset.
REVIEW-112 Moved the responsibility of validating cmd line options to the CommandLineParser.

    • -0
    • +11
    ./CommandLineTaskConfigurerSpec.groovy
  1. … 7 more files in changeset.
REVIEW-112 Some refactoring. Shifted some complexity to a different type.

    • -0
    • +11
    ./CommandLineTaskConfigurerSpec.groovy
  1. … 3 more files in changeset.
REVIEW-112 Tidy up in the task command line args area.

1. Added/tightened coverage

2. Fixed the problem with the same option applied on different tasks with different value in a single command line

    • -2
    • +13
    ./CommandLineTaskConfigurerSpec.groovy
  1. … 3 more files in changeset.
Moved classes to a better package.

    • -0
    • +155
    ./CommandLineTaskConfigurerSpec.groovy
  1. … 5 more files in changeset.