From 53d01e5fe1e23179b9bda6c32bc5c70b77b89bb2 Mon Sep 17 00:00:00 2001 From: ma wei Date: Thu, 14 May 2015 11:04:39 +0800 Subject: [PATCH] update usage for multiple sub project Former-commit-id: 16aac082aa5f52f01db8f6935252306bd176860b --- dependency-check-gradle/README.md | 34 +++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/dependency-check-gradle/README.md b/dependency-check-gradle/README.md index 509fd0574..2d77772ad 100644 --- a/dependency-check-gradle/README.md +++ b/dependency-check-gradle/README.md @@ -70,6 +70,38 @@ buildscript { apply plugin: "dependency.check" ``` +**If your project includes multiple sub-project, configure build script this way:** + +``` +allprojects { + //other plugins you may use + //apply plugin: "java" + + apply plugin: "dependency-check" + + repositories { + mavenCentral() + } +} +``` + +or + +``` +subprojects { + //other plugins you may use + //apply plugin: "java" + + apply plugin: "dependency-check" + + repositories { + mavenCentral() + } +} +``` + +In this way, the dependency check will be executed for all projects (including root project) or just sub projects. + #### Solution 3,Maven Central working in progress @@ -83,3 +115,5 @@ gradle dependencyCheck ``` The reports will be generated automatically under `./reports` folder. + +If your project includes multiple sub-projects, the report will be generated for each sub-project in different sub-directory.