Issue with spotbugs 3.0.0 plug in and flat directories

I am working on a Linux network with out internet access and am stuck with flat directories for repositories and I am having a problem with the spotbugs plug in, I am getting the following error while using gradle 5.5:

  • What went wrong:
    A problem occurred evaluating root project ‘testing’.

plugin with id ‘com.github.com.spotbugs’

I have the following in my build.gradle file:


buildscript {
repositories {
flatDir {
dirs '/libs/spotbugs/3.1.12/
}
}
dependencies {
classpath ‘com.github.spotbugs:spotbugs-gradle-plugin:3.0.0’
}
}

apply plugin: ‘com.github.spotbugs’

I have look at the output of --info, --debug and --stacktrace which did not help at all.

Any help would be appreciated.

Thanks

I also tried classpath files (’…/spotbugs-gradle-plugin-3.0.0’) with the same results.

Thanks,

flatDir sucks! Have you considered using a maven directory structure in a local folder instead? This way you can benefit from group/artifact/version semantics, include poms with your artifacts and also javadocs and sources etc. With flatDir you lose these dependency resolution features.

Eg:

repositories {
   maven {
      url uri('path/to/repo') 
   } 
} 

Related: Include local javadoc with gradle