ErrorProneChecksPlugin

public final class ErrorProneChecksPlugin

A Gradle plugin which configures the project to run Spine-custom Error Prone checks during the compilation stage.

To work, this plugin requires the Error Prone plugin to be applied to the project.

The plugin adds a spine-errorprone-checks dependency to the project's annotationProcessor configuration. For the older Gradle versions (pre 4.6), where there is no such configuration, the plugin creates it.

Dependency has the same version as the project's spine-model-compiler plugin dependency.

Checks severity may be configured for all checks:



  modelCompiler {
     spineCheckSeverity = "OFF"
  }
or for the specific ones:


  spineErrorProneChecks {
     useValidatingBuilder = "ERROR"
  }

The latter overrides the former.

See also

io.spine.protobuf.ValidatingBuilder

Constructors

Link copied to clipboard
public void ErrorProneChecksPlugin()

Functions

Link copied to clipboard
public void apply(Project project)
Applies the plugin to the given Project.
Link copied to clipboard
public static String extensionName()