kudu-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ale...@apache.org
Subject [3/4] kudu git commit: [Java] Use spotbugs in place of findbugs in gradle
Date Mon, 30 Apr 2018 15:31:56 GMT
[Java] Use spotbugs in place of findbugs in gradle

Change-Id: I2c9863dc59cc6670e2f25c857ba8662b5d4fe4e6
Reviewed-on: http://gerrit.cloudera.org:8080/10187
Tested-by: Grant Henke <granthenke@apache.org>
Reviewed-by: Todd Lipcon <todd@apache.org>


Project: http://git-wip-us.apache.org/repos/asf/kudu/repo
Commit: http://git-wip-us.apache.org/repos/asf/kudu/commit/f8517483
Tree: http://git-wip-us.apache.org/repos/asf/kudu/tree/f8517483
Diff: http://git-wip-us.apache.org/repos/asf/kudu/diff/f8517483

Branch: refs/heads/master
Commit: f8517483935358aa6f7cf21b11717102476ab87d
Parents: 0aa2203
Author: Grant Henke <granthenke@apache.org>
Authored: Wed Apr 25 11:39:30 2018 -0500
Committer: Todd Lipcon <todd@apache.org>
Committed: Fri Apr 27 21:55:59 2018 +0000

----------------------------------------------------------------------
 java/buildSrc/build.gradle      |  1 +
 java/gradle/dependencies.gradle |  2 +-
 java/gradle/quality.gradle      | 16 ++++++++--------
 3 files changed, 10 insertions(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/kudu/blob/f8517483/java/buildSrc/build.gradle
----------------------------------------------------------------------
diff --git a/java/buildSrc/build.gradle b/java/buildSrc/build.gradle
index 8e380fa..d69e733 100644
--- a/java/buildSrc/build.gradle
+++ b/java/buildSrc/build.gradle
@@ -33,6 +33,7 @@ dependencies {
   compile "com.github.jengelman.gradle.plugins:shadow:2.0.3"
   compile "com.google.protobuf:protobuf-gradle-plugin:0.8.5"
   compile "com.netflix.nebula:nebula-clojure-plugin:5.0.6"
+  compile "gradle.plugin.com.github.spotbugs:spotbugs-gradle-plugin:1.6.1"
   compile "io.spring.gradle:propdeps-plugin:0.0.9.RELEASE"
   compile "net.ltgt.gradle:gradle-errorprone-plugin:0.0.13"
   compile "ru.vyarus:gradle-animalsniffer-plugin:1.4.3"

http://git-wip-us.apache.org/repos/asf/kudu/blob/f8517483/java/gradle/dependencies.gradle
----------------------------------------------------------------------
diff --git a/java/gradle/dependencies.gradle b/java/gradle/dependencies.gradle
index b6980e4..28dfd51 100755
--- a/java/gradle/dependencies.gradle
+++ b/java/gradle/dependencies.gradle
@@ -31,7 +31,6 @@ versions += [
     clojureToolsCli: "0.3.5",
     commonsIo      : "2.6",
     errorprone     : "2.3.1",
-    findbugs       : "3.0.1",
     flume          : "1.8.0",
     gradle         : "4.7",
     // We use the android version instead of the jre version
@@ -59,6 +58,7 @@ versions += [
     slf4j          : "1.7.25",
     spark          : "2.3.0",
     sparkAvro      : "4.0.0",
+    spotBugs       : "3.1.3",
     yetus          : "0.7.0"
 ]
 

http://git-wip-us.apache.org/repos/asf/kudu/blob/f8517483/java/gradle/quality.gradle
----------------------------------------------------------------------
diff --git a/java/gradle/quality.gradle b/java/gradle/quality.gradle
index de6fa05..b256edd 100644
--- a/java/gradle/quality.gradle
+++ b/java/gradle/quality.gradle
@@ -18,7 +18,7 @@
 // This file contains common tasks and configuration for checking the quality of the code.
 
 apply plugin: "checkstyle" // Ensures Java code follows the defined coding style.
-apply plugin: "findbugs"   // Performs static code analysis to look for bugs in Java code.
+apply plugin: "com.github.spotbugs"   // Performs static code analysis to look for bugs in
Java code.
 apply plugin: "net.ltgt.errorprone" // Performs static code analysis to look for bugs in
Java code.
 apply plugin: "pmd"        // Performs static code analysis to look for common code smells
in Java code.
 apply plugin: "com.github.ben-manes.versions" // Provides a task to determine which dependencies
have updates.
@@ -39,23 +39,23 @@ task checkstyle(dependsOn: [checkstyleMain, checkstyleTest, checkstyleIntegratio
   description = "Run Checkstyle analysis."
 }
 
-findbugs {
-  toolVersion = versions.findbugs
+spotbugs {
+  toolVersion = versions.spotBugs
   ignoreFailures = true
   effort = "max"
 }
 
-tasks.withType(FindBugs) {
+tasks.withType(com.github.spotbugs.SpotBugsTask) {
   reports {
     xml.enabled false
     html.enabled true
   }
 }
 
-// Create an aggregate findbugs task.
-// This simplifies running findbugs on all the code by only needing one task instead of multiple
in your command.
-task findbugs(dependsOn: [findbugsMain, findbugsTest, findbugsIntegrationTest], group: "Verification")
{
-  description = "Run FindBugs analysis."
+// Create an aggregate spotbugs task.
+// This simplifies running spotbugs on all the code by only needing one task instead of multiple
in your command.
+task spotbugs(dependsOn: [spotbugsMain, spotbugsTest, spotbugsIntegrationTest], group: "Verification")
{
+  description = "Run SpotBugs analysis."
 }
 
 pmd {


Mime
View raw message