If you want to see a live example of the capabilities of the Android plugin, you can have a look at the MorseFlash project.
Description / Features
This plugin enhances the Java Ecosystem to analyze Android projects within SonarQube:
- Adds a new set of set of rules based on Android lint
- On top of Java files, Android Manifest and resources (such as layouts or pictures) are analyzed
Note that you have to install the different Patforms/API whose that your projects are built with.
Run an Analysis with the SonarQube Runner (Recommended method)
To run an analysis of your Android project, use the SonarQube Runner.
Run an Analysis with the other Analyzers
To display code coverage data:
- Prior to the SonarQube analysis, execute your unit tests and generate the Emma 2.0 reports (.em and .ec files)
- Import these reports while running the SonarQube analysis by setting the
sonar.android.emma.reportproperty to the path of the directory containing the Emma reports. The path may be absolute or relative to the project base directory for standard projects, relative to the module base directory for multi-module projects.
As Since the SQALE model for Java is already provided by the Java Ecosystem, the SQALE model for Android has to be applied manually:
- Download the XML file containing the SQALE model
- Log in as a System administratorAdministrator
- Go to Settings > SQALE > ImportBack Up / Export Restore > Merge modelModel
- Upload the XML file
- Click on "Merge selected files"