While a full Gradle Plugin is planned, the following gradle task can be used to run dependency-check:
configurations {
depCheck
}
dependencies {
depCheck "org.owasp:dependency-check-ant:1.2.11"
}
task checkDeps << {
ant.taskdef(name: 'checkDepsTask',
classname: 'org.owasp.dependencycheck.taskdefs.DependencyCheckTask',
classpath: configurations.depCheck.asPath)
ant.checkDepsTask() {
path {
pathelement(path: sourceSets.main.runtimeClasspath.asPath)
}
}
}
The above task definition was provided by Nikita Koksharov.