Annotation Interface PluginApi


@Target({TYPE,METHOD,FIELD}) @Retention(SOURCE) @Documented public @interface PluginApi
This annotation is used to denote a class or method as part of the public API that can be used by other Gradle plugins. It means that this API will not change within a release in a way that would make it no longer compatible with an earlier version.

When a class is designated as public api, it means that the class name itself will not change, it does not indicate anything about methods or fields inside the class. In fact, all non-annotated fields and methods are not public API.

  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    boolean
    Indicates if the interface annotated with PluginApi may be subclassed by a different plugin.
  • Element Details

    • forSubclassing

      boolean forSubclassing
      Indicates if the interface annotated with PluginApi may be subclassed by a different plugin.

      Only interfaces or classes that are explicitly marked as suitable for subclassing may be implemented or extended by a different plugin.

      Default:
      false