How to set minimum tokens for PMD plugin?

In maven, you can do the following:


How do I set the minimumTokens in Gradle’s PMD plugin?

The ‘minimumTokens’ configuration is only used by the CPD tool, which while part of the PMD project, is not included in Gradle’s PMD plugin. If you wish to use CPD in your project there looks to be a third-party plugin available.