Run jdeprscan on project sources
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.

README.adoc

jdeprscan-gradle-plugin

Build Status Apache License 2 download donations Patreon orange


Runs the jdeprscan command on the project’s output.

Usage

Option #1

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

Option #2

plugins {
    id 'org.kordamp.gradle.jdeprscan' version '0.4.0'
}

This will add a jdeprScanReport task to your build, which will analyze the main sourceSets using the runtime configuration as classpath.

Configuration

Plugin configuration

The following properties can be specified in the jdeprScanReport task configuration

Name

Type

Default Value

forRemoval

boolean

false

release

int

9

verbose

boolean

false

javaHome

String

consoleOutput

boolean

true

reportsDir

File

"${buildDir}/reports/jdeprscan"

configurations

List<String>

['runtime']

sourceSets

List<String>

['main']

You may run this plugin in a build that relies Java 8 as long as you configure a valid path to a JDK9+ installation directory using the javaHome property, for example

jdeprScanReport {
    javaHome = '/Library/Java/JavaVirtualMachines/jdk-9.jdk/Contents/Home'
}

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 jdeprScanReport on production and test sources

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