@@ -17,6 +17,7 @@ plugins {
1717 id ' me.champeau.gradle.jmh' version ' 0.4.5'
1818 id ' nebula.optional-base' version ' 3.2.0'
1919 id ' com.github.hierynomus.license' version ' 0.15.0'
20+ id ' com.github.spotbugs' version " 4.3.0"
2021}
2122
2223allprojects {
@@ -44,19 +45,23 @@ allprojects {
4445
4546subprojects {
4647 apply plugin : ' com.jfrog.bintray'
47- apply plugin : ' findbugs '
48+ apply plugin : ' com.github.spotbugs '
4849 apply plugin : ' jacoco'
4950 apply plugin : ' java'
5051 apply plugin : ' maven-publish'
5152 apply plugin : ' me.champeau.gradle.jmh'
5253 apply plugin : ' nebula.optional-base'
5354 apply plugin : ' com.github.hierynomus.license'
5455
56+
5557 sourceCompatibility = 1.8
5658 targetCompatibility = 1.8
5759
5860 repositories {
5961 jcenter()
62+ maven {
63+ url ' https://plugins.gradle.org/m2/'
64+ }
6065 }
6166
6267 task sourcesJar(type : Jar , dependsOn : classes) {
@@ -74,15 +79,15 @@ subprojects {
7479 archives javadocJar
7580 }
7681
77- tasks . withType( FindBugs ) {
82+ spotbugsMain {
7883 reports {
7984 xml. enabled = false
8085 html. enabled = true
8186 }
8287 }
8388
84- findbugs {
85- findbugsJmh . enabled = false
89+ spotbugs {
90+ spotbugsJmh . enabled = false
8691 }
8792
8893 test {
@@ -207,9 +212,9 @@ task jacocoRootReport(type: JacocoReport, group: 'Coverage reports') {
207212 description = ' Generates an aggregate report from all subprojects'
208213 dependsOn publishedProjects. test, jacocoMerge
209214
210- additionalSourceDirs = files(publishedProjects. sourceSets. main. allSource. srcDirs)
211- sourceDirectories = files(publishedProjects. sourceSets. main. allSource. srcDirs)
212- classDirectories = files(publishedProjects. sourceSets. main. output)
215+ getAdditionalSourceDirs() . setFrom( files(publishedProjects. sourceSets. main. allSource. srcDirs) )
216+ getSourceDirectories() . setFrom( files(publishedProjects. sourceSets. main. allSource. srcDirs) )
217+ getAdditionalClassDirs() . setFrom( files(publishedProjects. sourceSets. main. output) )
213218 executionData jacocoMerge. destinationFile
214219
215220 reports {
0 commit comments