ignoreDependencies

abstract fun ignoreDependencies(groupId: String, artifactId: String? = null, options: Action<LicenseeExtension.IgnoreDependencyOptions> = Action { })

Ignore a single dependency or group of dependencies during dependency graph resolution. Artifacts targeted with this method will not be analyzed for license information and will not show up in any report files.

This function can be used to ignore internal, closed-source libraries and commercial libraries for which you've purchased a license.

There are overloads which accept either a groupId or a groupId:artifactId pair.

licensee {
ignoreDependencies('com.mycompany.internal')
ignoreDependencies('com.mycompany.utils', 'utils')
}

A reason string can be supplied to document why the dependencies are being ignored.

licensee {
ignoreDependencies('com.example.sdk', 'sdk') {
because "commercial SDK"
}
}

An ignore can be marked as transitive which will ignore an entire branch of the dependency tree. This will ignore the target artifact's dependencies regardless of the artifact coordinates or license info. Since it is especially dangerous, a reason string is required.

licensee {
ignoreDependencies('com.other.sdk', 'sdk') {
transitive = true
because "commercial SDK"
}
}