Annotation Interface OptionalPackage


@Retention(RUNTIME) @Target(PACKAGE) @Documented public @interface OptionalPackage
Works in conjunction with OptionalExtension to allow you to turn the entire packages conditional.

This annotation is only effective for classes that are direct members of the package. For example, if you put this annotation on com.example, com.example.sub.Foo will not be affected. This is due to the way Java package works.

Author:
Kohsuke Kawaguchi
  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    Classes that are required to activate this extension.
    Short names of the plugins that are required to trigger this extension.
    Variants that are required to activate this extension.
  • Element Details

    • requirePlugins

      String[] requirePlugins
      Short names of the plugins that are required to trigger this extension.
      Default:
      {}
    • requireClasses

      Class[] requireClasses
      Classes that are required to activate this extension.
      Default:
      {}
    • requireVariants

      String[] requireVariants
      Variants that are required to activate this extension.
      Default:
      {}