Class ShadowApiDetectorPlugin

java.lang.Object
com.arc_e_tect.gradle.shadow.ShadowApiDetectorPlugin
All Implemented Interfaces:
org.gradle.api.Plugin<org.gradle.api.Project>

public class ShadowApiDetectorPlugin extends Object implements org.gradle.api.Plugin<org.gradle.api.Project>
Gradle plugin that registers the detectShadowApis task and wires the shadowApiDetector DSL extension into the project.

Usage

 plugins {
     id 'com.arc-e-tect.shadow-api-detector'
 }

 shadowApiDetector {
     rootDocument = file('src/main/resources/openapi/openapi.yaml')
 }
 

Defaults

  • Controller directories: src/main/java
  • OpenAPI description directory: the root document's own parent directory
  • Fail on shadow APIs: false
  • Report directory: build/reports/shadow-api-detector
  • Report file name: shadow-apis.adoc

The task is added as a dependency of check, so running ./gradlew check always regenerates the report.

  • Field Details

  • Constructor Details

    • ShadowApiDetectorPlugin

      public ShadowApiDetectorPlugin()
      Creates a new plugin instance. Instantiated by Gradle infrastructure.
  • Method Details

    • apply

      public void apply(org.gradle.api.Project project)
      Specified by:
      apply in interface org.gradle.api.Plugin<org.gradle.api.Project>