Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tag: v1.3.6
Fetching contributors…

Octocat-spinner-32-eaf2f5

Cannot retrieve contributors at this time

file 26 lines (24 sloc) 1.211 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
// To use findbugs you must have findbugs installed. Additionally you need a property called findbugsHome. You can define this
// in ~/.gradle/gradle.properties

task findbugs(dependsOn: tasks.withType(Jar).all) << {
    ant {
        taskdef(name: "findbugs", classname: "edu.umd.cs.findbugs.anttask.FindBugsTask", classpath: "$findbugsHome/lib/findbugs-ant.jar")
        mkdir dir: "$buildDir/findbugs-report"
        findbugs(home: findbugsHome, output: "xml:withMessages", outputFile: "$buildDir/findbugs-report/grails-fb.xml", jvmargs: "-Xmx768M") {
            auxClasspath() {
                fileset(dir: "lib") {
                    include(name: "*.jar")
                    exclude(name: "jsp-api-2.1.jar")
                }
                fileset(dir: "${System.properties['JAVA_HOME']}/lib") {
                    include(name: "tools.jar")
                }
            }
            sourcePath path: file('src/java')
            auxAnalyzepath() {
                fileset dir: libsDir, includes: "grails-*.jar"
            }
        }
        xslt(in: "$buildDir/findbugs-report/grails-fb.xml", out: "$buildDir/findbugs-report/grails-fb.html", style: "$findbugsHome/src/xsl/fancy.xsl")
    }
}
Something went wrong with that request. Please try again.