其中pmd gradle报告为groovy生成

时间:2016-03-20 06:16:56

标签: gradle groovy pmd

这是配置,它显示构建成功但不生成报告。任何帮助,将不胜感激。

apply plugin: 'pmd'
    apply plugin: "findbugs"
    pmd(
      'net.sourceforge.pmd:pmd-core:5.2.1',
      'net.sourceforge.pmd:pmd-java:5.2.1',
      'net.sourceforge.pmd:pmd-groovy:5.2.1'
       )

    findbugs {
    //consoleOutput = true
    ignoreFailures = true
    toolVersion = "2.0.1"
    sourceSets = [sourceSets.main]
    reportsDir = file("build/reports/findbugs")
    effort = "max"
    }

    pmd {
    consoleOutput= true
    ignoreFailures = false
    // sourceSets = [sourceSets.main]
    reportsDir = file("build/reports/pmd")
    ruleSets = [
            "basic",
            "braces",
            "naming",
            "android",
            "clone"       
    ]
    }

   tasks.withType(FindBugs) {
    reports {
        xml.enabled = false
        html.enabled = true
    }
   }
   tasks.withType(Pmd){
     reports {
        xml.enabled false
        html.enabled true
    }

以下是我的构建结果

./gradlew build
    :compileJava UP-TO-DATE
    :compileGroovy UP-TO-DATE
    :processResources UP-TO-DATE
    :classes UP-TO-DATE
    :findMainClass
    :jar
    :bootRepackage
    :assemble
    :findbugsMain UP-TO-DATE
    :pmdMain UP-TO-DATE
    :pmdTest UP-TO-DATE
    :compileTestJava UP-TO-DATE
    :compileTestGroovy UP-TO-DATE
    :processTestResources UP-TO-DATE
    :testClasses UP-TO-DATE
    :test UP-TO-DATE
    :check UP-TO-DATE
    :build

建立成功

总时间:8.731秒

0 个答案:

没有答案