Option #1
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'org.kordamp.gradle:jdeps-gradle-plugin:0.5.0'
}
}
apply plugin: 'org.kordamp.gradle.jdeps'
Option #2
plugins {
id 'org.kordamp.gradle.jdeps' version '0.5.0'
}
This will add a jdepsReport
task to your build, which will analyze the main
sourceSets and all dependencies found in the
runtime
configuration.
The following properties can be specified in the jdeps
task configuration
Name |
Type |
Default Value |
verbose |
boolean |
false |
summary |
boolean |
false |
profile |
boolean |
false |
recursive |
boolean |
false |
jdkinternals |
boolean |
true |
consoleOutput |
boolean |
true |
reportsDir |
File |
"${buildDir}/reports/jdeps" |
configurations |
List<String> |
['runtime'] |
sourceSets |
List<String> |
['main'] |
You may configure multiple sourceSets and configurations, which will be evaluated in a single report. The following snippet
shows how this plugin can be configured to run jdeps
on production and test sources
jdepsReport {
sourceSets = ['main', 'test']
configurations = ['testRuntime']
}