Description / Features
This plugin enhances the Java Ecosystem 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
- Simple project analyzed with the SonarQube Runner: /projects/languages/android/android-sonarqube-runner
- Simple Maven project and code coverage with Emma: /projects/languages/android/android-maven-emma
- Simple Maven project and code coverage with JaCoCo: /projects/languages/android/android-maven-jacoco
Extending Coding Rules using XPath
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 administrator
- Go to Settings > SQALE > Import/Export > Merge model
- Upload the XML file
- Click on "Merge selected files"