Resolve findBugs issue in gradle

saeedj picture saeedj · Nov 22, 2019 · Viewed 12.5k times · Source

Overview:

I am trying to upgrade Java and Gradle version in my project as follows:

  • java from 8 to 11
  • Gradle from 5 to 6

My project runs with no issues on the old versions but when runs on Java 11 and Gradle 6 it complains about fireBugs plugin and raises the following exception:

 > Plugin with id 'findbugs' not found.

Snippet of gradle file:

buildscript {
    ext {
        SampleProjectVersion = '1.3.4'
    }
    repositories {
        mavenLocal()
        maven {
            url1
        }
    }
    dependencies {
        classpath(sample lib 1)
        classpath(sample lib 2)
    }

apply plugin: 'findbugs'

...

I would appreciate if you could share your thoughts with me as I couldn't find any proper solution for that.

Answer

Andrea picture Andrea · Nov 29, 2019

From the Gradle web site (Upgrading your build from Gradle 5.x to 6.0):

The FindBugs plugin has been removed

The deprecated FindBugs plugin has been removed. As an alternative, you can use the SpotBugs plugin from the Gradle Plugin Portal.

https://docs.gradle.org/current/userguide/upgrading_version_5.html