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.

Applying this plugin pulls in whatever version of each of the three detector plugins was the latest published one at the time this suite's own version was released - not necessarily each plugin's current latest, since a consumer only re-resolves it by upgrading the suite itself. The release pipeline resolves each sibling's real published version from its own release tags immediately before publishing this plugin, and - since Aug 2026 - waits for any sibling release still in flight to finish first, so this suite is never published pinned to a sibling version older than what that same change actually released. This suite's own release workflow fires both when this plugin's own files change and whenever any sibling's release workflow completes, so a sibling-only change (no file under this module touched at all) still reaches a new release of this suite - not just changes to this module's own source.

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'
 }
 

detectAllApiGaps never fails the build on a detected gap

detectAllApiGaps always runs all three detectors to completion and never fails the build, regardless of failOnShadow/failOnMirage/failOnDoppelganger. It depends on three dedicated task instances - not detectShadowApis/detectMirageApis/ detectDoppelgangerApis themselves - configured identically except with their own fail-on-gap property forced to false, so a shadow API found first can never prevent Mirage or Doppelganger from running. Run the individual detectShadowApis/detectMirageApis/ detectDoppelgangerApis tasks directly (or wire them into check individually) when you want the build to actually fail on a detected gap.

  • Field Details

    • TASK_NAME

      public static final String 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:
      apply in interface org.gradle.api.Plugin<org.gradle.api.Project>