Package com.arc_e_tect.gradle.shadow
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 not wired into check or build automatically -
teams that generate their OpenAPI documentation from code would otherwise see every build fail
on documentation that hasn't been regenerated yet. Opt in explicitly once the task is safe to
run as part of your build:
tasks.named('check') {
dependsOn 'detectShadowApis'
}
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
TASK_NAME
Name of the Gradle task registered by this plugin.- See Also:
-
-
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:
applyin interfaceorg.gradle.api.Plugin<org.gradle.api.Project>
-