Package org.gradle.api.tasks.options

## Annotation Type Option

-     @Retention(RUNTIME)
      @Target({METHOD,FIELD})
      @Inherited
      public @interface Option

  Marks a property of a `Task` as being configurable from the command-line.

  This annotation should be attached to a field or a setter method. When attached to a field, `option()` will use the name of the field by default. When attached to a method, `option()` must be specified.

  An option may have one of the following types:

  - `boolean`
  - `Boolean`
  - `Property<Boolean>`
  - an `enum` type
  - `Property<T>` of an enum type
  - `String`
  - `Property<String>`
  - `List<T>` of an `enum` type
  - `List<String>`
  Since:
    4.6

- - ### Required Element Summary

    Required Elements
    Modifier and Type | Required Element | Description
    --- | --- | ---
    `java.lang.String` | `description` | The description of this option.

  - ### Optional Element Summary

    Optional Elements
    Modifier and Type | Optional Element | Description
    --- | --- | ---
    `java.lang.String` | `option` | The option to map to this property.

- - ### Element Detail

    - #### description

          java.lang.String description

      The description of this option.
      Returns:
        The description.

  - - #### option

          java.lang.String option

      The option to map to this property. Required when annotating a method. May be omitted when annotating a field in which case the field's name will be used.
      Returns:
        The option.
      Default:
        ""