IntentionallyNonTransitiveDependency

Exempts the annotated declaration, parameter, or type usage from Public types from non-transitive dependencies. On a class, it covers every nested declaration.

Apply it when the environment that loads the library has the dependency on its classpath. A Gradle plugin is the common case: it compiles against gradleApi() and runs inside Gradle. Name the environment in description.

To exempt every type of the dependency, declare it on the apiWatchdogExemptNonTransitive configuration instead (Exempting a dependency):

dependencies {
implementation("com.example:models:1.0.0")
apiWatchdogExemptNonTransitive("com.example:models")
}

Parameters

description

Properties

Link copied to clipboard
Link copied to clipboard