Package com.arc_e_tect.gradle.suite
Class ApiOnlySuitePlugin
java.lang.Object
com.arc_e_tect.gradle.suite.ApiOnlySuitePlugin
- All Implemented Interfaces:
org.gradle.api.Plugin<org.gradle.api.Project>
public class ApiOnlySuitePlugin
extends Object
implements org.gradle.api.Plugin<org.gradle.api.Project>
Gradle plugin that applies the Shadow, Mirage, and Doppelganger API Detector plugins together,
and registers the
detectAllApiGaps aggregate task and the apiOnlySuite DSL
extension.
This is a pure composition module: it contains no detection logic of its own, only wiring. Each of the three underlying plugins registers its own task and extension exactly as it does when applied on its own - applying via this suite is indistinguishable, from each individual plugin's point of view, from a consumer applying it directly. None of the three plugins was modified to support being applied this way.
Usage
plugins {
id 'com.arc-e-tect.api-only-suite'
}
apiOnlySuite {
rootDocument = file('src/main/resources/openapi/openapi.yaml')
}
The aggregate task is not wired into check or build
automatically, for the same reason none of the three individual plugins are. Opt in explicitly
once the task is safe to run as part of your build:
tasks.named('check') {
dependsOn 'detectAllApiGaps'
}
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
TASK_NAME
Name of the aggregate Gradle task registered by this plugin.- See Also:
-
-
Constructor Details
-
ApiOnlySuitePlugin
public ApiOnlySuitePlugin()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>
-