Run JDeps on a Gradle build
Groovy
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
gradle
src/main/groovy/org/kordamp/gradle/jdktools
.gitignore
.travis.yml
LICENSE
README.adoc
build.gradle
gradle.properties
gradlew
gradlew.bat

README.adoc

jdeps-gradle-plugin

Build Status Apache License 2 download donations Patreon orange


Runs the jdeps command on the project’s output and all of its dependencies.

Usage

Option #1

buildscript {
    repositories {
        jcenter()
    }
    dependencies {
        classpath 'org.kordamp.gradle:jdeps-gradle-plugin:0.3.0'
    }
}
apply plugin: 'org.kordamp.jdeps'

Option #2

plugins {
    id 'org.kordamp.jdeps' version '0.3.0'
}

This will add a jdeps task to your build, which will analyze the main sourceSets and all dependencies found in the runtime configuration.

Configuration

Plugin 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

failOnError

boolean

true

consoleOutput

boolean

true

reportsDir

File

"${buildDir}/reports/jdeps"

configurations

List<String>

['runtime']

sourceSets

List<String>

['main']

If failOnError is set to true the build will result in failure if jdeps reports any problems.

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

jdeps {
    sourceSets = ['main', 'test']
    configurations = ['testRuntime']
}