= jdeps-gradle-plugin :linkattrs: :project-owner: kordamp :project-repo: maven :project-name: jdeps-gradle-plugin :project-group: org.kordamp.gradle :project-version: 0.20.0 :plugin-id: {project-group}.jdeps
image:https://img.shields.io/github/actions/workflow/status/{project-owner}/{project-name}/early-access.yml?branch=master&logo=github&label=Build["Build Status", link="https://github.com/{project-owner}/{project-name}/actions"] image:https://img.shields.io/gradle-plugin-portal/v/{plugin-id}?logo=gradle["Gradle Plugin Portal", link="https://plugins.gradle.org/plugin/{plugin-id}"]
Runs the jdeps
command on the project's output and all of its dependencies.
== Usage
This will add a jdepsReport
task to your build, which will analyze the main
sourceSet. Should you need to analyze
dependencies then define a value for either classpaths
or configurations
.
== Configuration === Plugin configuration
The following properties can be specified in the jdeps
task configuration
[options="header"]
|===
| Name | Option | Property | Type | Default Value
| listDeps | list-deps | jdeps.list.deps | boolean | false
| listReducedDeps | list-reduced-deps | jdeps.list.reduced.deps | boolean | false
| printModuleDeps | print-module-deps | jdeps.print.module.deps | boolean | false
| verbose | verbose | jdeps.verbose | boolean | false
| modular | modular | jdeps.modular | boolean | false
| summary | summary | jdeps.summary | boolean | false
| profile | profile | jdeps.profile | boolean | false
| recursive | recursive | jdeps.recursive | boolean | false
| jdkinternals | jdkinternals | jdeps.jdkinternals | boolean | false
| apionly | apionly | jdeps.apionly | boolean | false
| failOnWarning | fail-on-warning | jdeps.fail.on.warning | boolean | false
| ignoreMissingDeps | ignore-missing-deps | jdeps.ignore.missing.deps | boolean | false
| missingDeps | missing-deps | jdeps.missing.deps | boolean | false
| include | include | jdeps.include | String |
| regex | regex | jdeps.regex | String |
| filter | filter | jdeps.filter | String |
| requires | require | jdeps.require | List
Task properties may be defined on the command line using their option name, or their property name, such as
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
=== MultiRelease JAR support
You may configure a version for the multiRelease
property in which case this setting will be applied --multi-release <version>
an all dependencies. If you need to check different releases per dependency then use the MultiReleaseJars
property
instead, for example
=== MonkeyPatching the module
There are times when explicit modular settings may be needed to generate a jdeps report. You have the option to specify these settings using a moduleOptions extension on the `jdepsReport task, for example
=== JDeps Subcommands
You may use any of these subcommands with jdeps:
--list-deps
--list-reduced-deps
--print-module-deps
The output of these commands will be written to a file matching <subcommand>-<[sourceset|configuration].name>.txt
,
for example invoking --print-module-deps
with default configuration will run jdeps on the main
sourceSet, resulting
in a file named build/reports/jdeps/print-module-deps-main.txt
.