Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Resolve findBugs issue in gradle

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.

like image 710
saeedj Avatar asked Nov 22 '19 00:11

saeedj


People also ask

Is FindBugs deprecated?

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

What is FindBugs Android?

findbugs-android This plugin provides those tasks already configured for you. In addition, the plugin automatically excludes Generated classes from Android databinding library, android resource, Butterknife and Dagger 2. If you want more added to this list or want it configurable, open an issue.


1 Answers

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

like image 111
Andrea Avatar answered Sep 19 '22 19:09

Andrea