I have a multi project gradle project, and have defined a task in the
parent:

// start
subprojects {
   apply plugin: 'java'
   apply plugin: 'code-quality'

   configurations { pmdConf }
   dependencies { pmdConf 'pmd:pmd:4.2.5' }

   task pmdCheck {
      println "Running PMD code check on " + project.name
      ant {
          // the ant definition for pmd in here: a taskdef with name pmdTask
and then invoking the task.
      }
   }
}

// end build.gradle


When I run anything on the parent, PMD is executed:
e.g. gradle compileJava
"Running PMD code check on subproject1"
"Running PMD code check on subproj2"
"Running PMD code check on subproj3"

Reply via email to