How to set minimum tokens for PMD plugin?

In maven, you can do the following:

<plugin>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-pmd-plugin</artifactId>
    <version>3.2</version>
    <configuration>
        <minimumTokens>40</minimumTokens>
        <targetJdk>1.5</targetJdk>
    </configuration>
</plugin>

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.