Annotation Type TestVariantResource


A resource to load test variants from.

The resource path is relative to the test class. Prefix it with a / to make it absolute.

The file should have one variant per line, colon-separated <gradle version>:<args...>. Arguments will automatically be split on spaces.

This annotation can be used as a composable meta-annotation.

Since:
1.1.0
  • Required Element Summary

    Required Elements
    Modifier and Type
    Required Element
    Description
    A resource on the classpath to load test variants from.
  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    int
    Maximum runtime version to execute the resource's variants on.
    int
    Minimum runtime version to execute the resource's variants on.
    boolean
    Whether to allow testing to proceed if no classpath resource was present.
  • Element Details

    • value

      String value
      A resource on the classpath to load test variants from.
      Returns:
      the resource
      Since:
      1.1.0
    • optional

      boolean optional
      Whether to allow testing to proceed if no classpath resource was present.
      Returns:
      whether this resource is optional
      Since:
      1.1.0
      Default:
      false
    • minimumRuntimeVersion

      int minimumRuntimeVersion
      Minimum runtime version to execute the resource's variants on.

      By default, permits any version.

      Returns:
      the minimum runtime version
      Since:
      1.4.0
      Default:
      -1
    • maximumRuntimeVersion

      int maximumRuntimeVersion
      Maximum runtime version to execute the resource's variants on.

      By default, permits any version. This must be greater than or equal to minimumRuntimeVersion()

      Returns:
      the maximum runtime version
      Since:
      1.4.0
      Default:
      2147483647