Description / Features
This plugin enhances the Java Plugin to analyze Android projects within SonarQube:
- Adds a new set of rules based on Android lint
- On top of Java files, Android Manifest and resources (such as layouts or pictures) are analyzed
The Android SDK must be installed on the machine(s) running the SonarQube analyses. The
ANDROID_HOME environment variable should be configured to point to the installation directory of the Android SDK.
Note that you have to install the different Patforms/API that your projects are built with.
- Install the plugin through the Update Center or download it into the SONARQUBE_HOME/extensions/plugins directory
- Restart the SonarQube server
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.
Extending Coding Rules using XPath
Currently, it is not possible to use SQALE with Android projects. This feature will be available in the next Android plugin version.
See the corresponding issue.