Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,9 @@ Once gradle plugin applied, run following gradle task to check dependencies:
gradle dependencyCheckAnalyze --info
```

The reports will be generated automatically under `build/reports` directory.
The reports will be generated automatically under `build/reports/dependency-check` directory.

If your project includes multiple sub-projects, the report will be generated for each sub-project in their own `build/reports`.
If your project includes multiple sub-projects, the report will be generated for each sub-project in their own `build/reports/dependency-check`.

## FAQ

Expand Down Expand Up @@ -123,14 +123,14 @@ For aggregate scan, apply the plugin either on the root project or alternatively

### How to customize the report directory?

By default, all reports will be placed under `build/reports` folder, to change the default reporting folder name modify the configuration section like this:
By default, all reports will be placed under `build/reports/dependency-check` folder, to change the default reporting folder name modify the configuration section like this:

```groovy
subprojects {
apply plugin: 'org.owasp.dependencycheck'

dependencyCheck {
outputDirectory = "$buildDir/security-report"
outputDirectory = layout.buildDirectory.dir('security-report')
}
}
```
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ class DependencyCheckExtension {
this.scanDependencies = objects.property(Boolean).convention(true)
this.failOnError = objects.property(Boolean).convention(true)
this.quickQueryTimestamp = objects.property(Boolean)
this.outputDirectory = objects.directoryProperty().convention(project.layout.buildDirectory.dir("reports"))
this.outputDirectory = objects.directoryProperty().convention(project.layout.buildDirectory.dir("reports/dependency-check"))
this.suppressionFile = objects.property(String)
this.suppressionFiles = objects.listProperty(String).convention([])
this.suppressionFileUser = objects.property(String)
Expand Down Expand Up @@ -212,9 +212,9 @@ class DependencyCheckExtension {
}

/**
* The directory where the reports will be written. Defaults to 'build/reports'.
* The directory where the reports will be written. Defaults to 'build/reports/dependency-check'.
*/
@InputDirectory
@Input
@Optional
DirectoryProperty getOutputDirectory() {
return outputDirectory
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ class DependencyCheckGradlePluginSpec extends Specification {
project.dependencyCheck.nvd.apiKey.getOrNull() == null
project.dependencyCheck.nvd.delay.getOrNull() == null
project.dependencyCheck.nvd.maxRetryCount.getOrNull() == null
project.dependencyCheck.outputDirectory.get().asFile == project.file("${project.buildDir}/reports")
project.dependencyCheck.outputDirectory.get().asFile == project.layout.buildDirectory.dir('reports/dependency-check').get().asFile
project.dependencyCheck.quickQueryTimestamp.getOrNull() == null
project.dependencyCheck.scanConfigurations.get() == []
project.dependencyCheck.skipConfigurations.get() == []
Expand Down
Loading