Skip to content

docs: introduce how to use SpotBugs in the Android project#281

Open
KengoTODA wants to merge 1 commit intomasterfrom
close-90
Open

docs: introduce how to use SpotBugs in the Android project#281
KengoTODA wants to merge 1 commit intomasterfrom
close-90

Conversation

@KengoTODA
Copy link
Copy Markdown
Member

#252 introduced android plugin support, then we can check the last checkbox in README.md.
This PR also add a short description about the usage of this plugin for Android project.

close #90

@KengoTODA KengoTODA self-assigned this Jun 6, 2020
@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud bot commented Jun 6, 2020

Kudos, SonarCloud Quality Gate passed!

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities (and Security Hotspot 0 Security Hotspots to review)
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information


TBU
Apply this plugin with the `com.android.application` plugin or `com.android.library` plugin to your project,
then [`SpotBugsTask`](https://spotbugs-gradle-plugin.netlify.com/com/github/spotbugs/snom/spotbugstask) will be generated for each existing variant.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd just like to point out that the tasks are only created for the production code variants on the Android projects. In Java projects, both production and test source sets gets corresponding tasks. It's relatively easy to do the same thing for Android projects.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be better to do it 👍, could you suggest the change making it possible?

I guess we need to use TestExtension, AppExtension#testVariants or AppExtension#unitTestVariants but not so sure.

@hazendaz
Copy link
Copy Markdown
Member

@KengoTODA You moving forward on this? Its been 3 years :)

@KengoTODA
Copy link
Copy Markdown
Member Author

Still waiting for help from community... I'm not Android dev so I can't make a progress on this topic by my own. Hope that somebody will help us at the pinned issue #90

Copilot AI review requested due to automatic review settings January 31, 2026 23:09
@sonarqubecloud
Copy link
Copy Markdown

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR completes the Android support documentation by marking the Android project checkbox as complete and adding usage instructions for applying SpotBugs to Android projects. This follows PR #252 which introduced Android Gradle Plugin support and closes issue #90.

Changes:

  • Marked the Android project support checkbox as complete in the goals list
  • Added documentation section explaining how to apply the SpotBugs plugin to Android projects, including instructions for automatic task generation and manual configuration options

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.


TBU
Apply this plugin with the `com.android.application` plugin or `com.android.library` plugin to your project,
then [`SpotBugsTask`](https://spotbugs-gradle-plugin.netlify.com/com/github/spotbugs/snom/spotbugstask) will be generated for each existing variant.
Copy link

Copilot AI Jan 31, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The URL for SpotBugsTask documentation has two issues:

  1. The base URL uses spotbugs-gradle-plugin.netlify.com while other SpotBugsTask references in the file (lines 127 and 140) use spotbugs.github.io/spotbugs-gradle-plugin/spotbugs-gradle-plugin
  2. The path uses spotbugstask (all lowercase) while line 127 uses -spot-bugs-task (with proper kebab-case)

For consistency with the rest of the README, this should match the URL format used in line 127.

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Unable to use Spotbugs in Android application

4 participants