diff --git a/src/site/markdown/gradle.md.vm b/src/site/markdown/gradle.md.vm new file mode 100644 index 000000000..9e8eeaffd --- /dev/null +++ b/src/site/markdown/gradle.md.vm @@ -0,0 +1,28 @@ +Gradle Integration +================== +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:${project.version}" +} + +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](https://github.com/mrniko). \ No newline at end of file diff --git a/src/site/markdown/index.md b/src/site/markdown/index.md index 88404d809..4371952ce 100644 --- a/src/site/markdown/index.md +++ b/src/site/markdown/index.md @@ -20,7 +20,8 @@ More information about dependency-check can be found here: OWASP dependency-check's core analysis engine can be used as: -- [Command Line Tool](dependency-check-cli/index.html) -- [Maven Plugin](dependency-check-maven/index.html) -- [Ant Task](dependency-check-ant/index.html) -- [Jenkins Plugin](dependency-check-jenkins/index.html) +- [Command Line Tool](dependency-check-cli/index.html) +- [Maven Plugin](dependency-check-maven/index.html) +- [Ant Task](dependency-check-ant/index.html) +- In a [Gradle Build](./gradle.html) +- [Jenkins Plugin](dependency-check-jenkins/index.html)