Open baloghadamsoftware opened 3 years ago
Thanks for opening your first issue here! :smiley: Please check our contributing guideline. Especially when you report a problem, make sure you share a Minimal, Complete, and Verifiable example to reproduce it in this issue.
refs #90
Hello,
I am trying out SpotBugs on open-source projects. The actual goal is to test my modifications in the locally SpotBugs, but I am already stuck at running release SpotBugs.
I read several, sometimes contradiction documentations. I had various errors, none of the worked. Finally, I found this one: https://mikedemaso.com/tech/2020-06-10-spotbugs-gradle-plugin-android/
This is the only one that seemed to work, but it still does not work perfectly.
The project I am using for testing is an Android app, called microMathematics: https://github.com/mkulesh/microMathematics
I changed its build.gradle to the following three files:
gradle.zip
I also modified the Gradle version in gradle/wrapper/gradle-wrapper.properties to 5.6 because the SpotBugs Gradle plugin requires that version.
However, after the analysis I got the following error message:
FAILURE: Build failed with an exception.
If I use the --stacktrace option, I get the following excpeption at the end:
I also tried to use newer Gradle, but then I got another kind of strange error. After that I also tried to use newer Gradle Android plugin and then this same error came back.
What I find strange is that not all, but almost all android classes are missing. Some of them are not. I grepped for all the imports and extracted a list of the used Android classes (without inner classes). I compared them to the list of missing classes and there were some differences.
imported_and_missing.zip
What did I wrong? How to analyze this project without errors? Also, how to use the locally built spotbugs instead of the one from the repository?
The Java version I use is OpenJDK 11.
On another project (https://github.com/matsim-org/matsim-libs), which uses Maven I already successfully tested my local SpotBugs instance. All I want to is to do the same on this Gradle-based project.
The third project I intend to analyze using the locally built SpotBugs is SpotBugs itself. Is there an already existing config for that?
Thank you for your help in advance!