options

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).

  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).

  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).

  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).

  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).

  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).

  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).

  1. … 31 more files in changeset.
Add support for `@Option` attached to task properties of type `Property<T>`.

Collection properties are not yet handled, nor is `@OptionValues` attached to a task property of type `Provider<T>`.

Also, for task properties of type `List<T>`, convert the elements to the declared element type, rather than just forwarding a `List<String>`.

  1. … 13 more files in changeset.
Remove internal Option/OptionValues annotations

Resolves #6285.

  1. … 9 more files in changeset.
Polish new command line options functionality (#4052)

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

  1. … 41 more files in changeset.
Add a test for multiple values in an option specification.

+review REVIEW-5861

Merge Pull Request #572 to add multiple parameter support.

+review REVIEW-5861

- This will allow options like --tests to have multiple instances

on the command line and be merged into a list of options in

the code.

    • -55
    • +0
    ./OptionNotationParserFactorySpec.groovy
    • -0
    • +55
    ./OptionValueNotationParserFactorySpec.groovy
  1. … 8 more files in changeset.
GRADLE-XXXX Ability to pass multiple command line "--tests" options to test task

    • -55
    • +0
    ./OptionNotationParserFactorySpec.groovy
    • -0
    • +55
    ./OptionValueNotationParserFactorySpec.groovy
  1. … 8 more files in changeset.
Allow specifying custom order of task options in help command output

This change was driven by the need to display more important option of build init plugin first.

    • -10
    • +53
    ./InstanceOptionDescriptorSpec.groovy
  1. … 11 more files in changeset.
Replaced `ValueAwareNotationParser.describeValues()` with new method on `DiagnosticVisitor`, so that values are now collected while visiting the description for a notation parser.

  1. … 12 more files in changeset.
Inlined JustReturningParser into its only subclass.

    • -1
    • +0
    ./OptionNotationParserFactorySpec.groovy
  1. … 2 more files in changeset.
Some tweaks to error messages for badly formed @Options.

    • -1
    • +1
    ./OptionNotationParserFactorySpec.groovy
  1. … 2 more files in changeset.
REVIEW-3519 Move @OptionValues lookup to OptionReader to

- cache the results

- fail early on wrong used annotations

    • -48
    • +10
    ./InstanceOptionDescriptorSpec.groovy
  1. … 4 more files in changeset.
REVIEW-3633: minor cleanup on option handling

- moved OptionNotationParserFactory to org.gradle.api.internal.tasks.options

- inject the NotationParserFactory to OptionElements and use factory method for creating

OptionElements

- throw OptionValidationException instead of GradleException in OptionNotationParserFactory

-

    • -0
    • +56
    ./OptionNotationParserFactorySpec.groovy
  1. … 8 more files in changeset.
REVIEW-3524 move more logic from OptionElements to NotationParser and OptionNotationParserFactory

  1. … 7 more files in changeset.
REVIEW-3521: fail when static methods and fields are annotated

  1. … 1 more file in changeset.
check setter available already when parsing option annotations on fields

  1. … 1 more file in changeset.
REVIEW-3521: use setter method to set a field value

  1. … 4 more files in changeset.
REVIEW-3521 let OptionReader accept any arbitrary object

  1. … 2 more files in changeset.
REVIEW-3510 change String[] Option.options() to String Option.option()

  1. … 13 more files in changeset.
REVIEW-3519: get rid of StaticOptionDescriptor

- add some more validation on option annotations

    • -5
    • +18
    ./InstanceOptionDescriptorSpec.groovy
  1. … 8 more files in changeset.
REVIEW-3518: fail on wrong OptionValues annotated methods

- consider all values of optionValues.value()

- fix OptionReaderTest

    • -0
    • +79
    ./InstanceOptionDescriptorSpec.groovy
  1. … 1 more file in changeset.
add copyright head => fix ci

  1. … 1 more file in changeset.
assert supported field type for option annotation;

- extract common methods of FieldOptionelement, MethodOptionElement to AbstractOptionelement

- validate that option name is valid

  1. … 5 more files in changeset.