Owner:
Danilo Pianini
Gradle plugin to find duplicate code using PMDs copy/paste detection (= CPD)
Version 4.0.6 (latest)
Created 28 November 2025.
Gradle plugin to find duplicate code using PMDs copy/paste detection (= CPD)
Add this plugin to your build using the plugins DSL:
plugins {
id("org.danilopianini.cpd") version "4.0.6"
}
See also:
-
Adding the plugin to build logic for usage in precompiled script plugins.
See the relevant documentation for more information.
Add this plugin as a dependency to
<convention-plugins-build>/build.gradle(.kts):dependencies { implementation("org.danilopianini.cpd:org.danilopianini.cpd.gradle.plugin:4.0.6") }It can then be applied in the precompiled script plugin:plugins { id("org.danilopianini.cpd") } -
The legacy method of plugin application.
See the relevant documentation for more information.buildscript { repositories { gradlePluginPortal() } dependencies { classpath("org.danilopianini.cpd:org.danilopianini.cpd.gradle.plugin:4.0.6") } } apply(plugin = "org.danilopianini.cpd") - Applying plugins to all subprojects .