Search code examples
androidgradlebuild.gradleandroid-librarypmd

How can I update PMD to newer version?


I have an Android library and an Android App project, what use the library PMD.

We use an older version and I am asked to update this PMD library to a more recent version 6.X.X

In the project, I found a rules-pmd.xml file with:

 <?xml version="1.0"?> <ruleset
     name="My rules"
     xmlns="http://pmd.sourceforge.net/ruleset/2.0.0"
     xsi:schemaLocation="http://pmd.sourceforge.net/ruleset/2.0.0
http://pmd.sourceforge.net/ruleset_5_3_1.xsd">

Changing this xml to

http://pmd.sourceforge.net/ruleset_6_12_0.xsd

did not help. And then in the modules build.gradle:

apply from: "$path/script-pmd.gradle"

Could not find any other version for PMD..

Where can I change the used PMD version?


Solution

  • As for the given question, you have to ask the libraries authors. Also you can take a look at the given library web link for more information about that.

    Update : in the given code you are seeing about making ruleset, as stated here so you have to check somewhere else for that.

    For example, i just checked and stated here you will find the needed information : follow the link

    The new version needs to be entered into _config.yml, e.g.:
    
    pmd:
    latestVersion: 6.0.0
    latestVersionDate: 15th December 2017
    

    _config