diff --git a/build.gradle b/build.gradle index b1d59642e10960a14aa11f220b6cfde564bad4ed..048c58610736806733963383f248ddac2aa1f324 100644 --- a/build.gradle +++ b/build.gradle @@ -2,11 +2,12 @@ apply plugin: 'java' apply plugin: 'eclipse' apply plugin: 'maven' apply plugin: 'jacoco' +apply plugin: 'findbugs' project.version = '1.0.0-SNAPSHOT' project.group = 'de.prob' -//sourceCompatibility = 1.5 +sourceCompatibility = 1.5 repositories { mavenCentral() @@ -104,31 +105,16 @@ task tlc4b(dependsOn: build) << { } } -task all(dependsOn: tlc4b) <<{ - ant.get(src: 'http://tla.msr-inria.inria.fr/tlatoolbox/dist/tla2tools.jar', verbose:true, dest: 'build/tlc4b/') -} - -allprojects { - // Marker Task to enable findbugs. - task findbugs( - group: "Verification", - description: """Marker task to enabled findbugs. Findbugs is by default - disabled. E.g. ( ./gradlew findbugs build )""" - ) -} - -subprojects { - apply plugin: 'findbugs' +tasks.withType(FindBugs) { + // disable findbugs by default + // in order to run findbugs type 'gradle tlc4b findbugsMain findbugsTest' + task -> enabled = gradle.startParameter.taskNames.contains(task.name) - findbugs { - // your findbugs configuration. - ignoreFailures = true - - } - gradle.taskGraph.whenReady { taskGraph -> - tasks.findbugsMain.onlyIf { taskGraph.hasTask((tasks.findbugs)) } - tasks.findbugsTest.onlyIf { taskGraph.hasTask((tasks.findbugs)) } - } + reports { + xml.enabled = false + html.enabled = true + } + + ignoreFailures = true } -