The Dependency Checker Gradle plugin lets you warn users if a specific configuration dependency is not the latest one available from the Maven central repository. The plugin eventually fails the build if the dependency age (the difference between the timestamp of the current version and the latest version) is above a predetermined threshold.
The plugin has been successfully tested with Gradle 4.10.2.
Usage
To use the plugin, include it in your build script:
buildscript {
dependencies {
classpath group: "com.liferay", name: "com.liferay.gradle.plugins.dependency.checker", version: "1.0.3"
}
repositories {
maven {
url "https://repository-cdn.liferay.com/nexus/content/groups/public"
}
}
}
apply plugin: "com.liferay.dependency.checker"
Project Extension
The Dependency Checker Gradle plugin exposes the following properties through
the extension named dependencyChecker
:
The same extension exposes the following methods:
Method | Description |
---|---|
void maxAge(Map<?, ?> args) | Declares the max age allowed for a dependency. The args map must contain the following entries:
|
Additional Configuration
There are additional configurations that can help you use the Deployment Helper.
Project Properties
It is possible to set the default values of the ignoreFailures
property via the project property dependencyCheckerIgnoreFailures
:
-PdependencyCheckerIgnoreFailures=false