Last active
February 17, 2018 19:56
-
-
Save JaKXz/8550278 to your computer and use it in GitHub Desktop.
Project build.xml (for ant sonar analysis) http://stackoverflow.com/questions/21267948/sonarqube-test-coverage-report-for-android-built-with-ant
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<project name="My Project" default="help" xmlns:sonar="antlib:org.sonar.ant"> | |
<!-- Define the SonarQube global properties (the most usual way is to pass these properties via the command line) --> | |
<property name="sonar.jdbc.url" value="jdbc:mysql://localhost:3306/sonar?useUnicode=true&characterEncoding=utf8" /> | |
<property name="sonar.jdbc.username" value="sonar" /> | |
<property name="sonar.jdbc.password" value="sonar" /> | |
<!-- Define the SonarQube project properties --> | |
<property name="sonar.projectKey" value="my-project" /> | |
<property name="sonar.projectName" value="My Project" /> | |
<property name="sonar.projectVersion" value="1.0" /> | |
<property name="sonar.language" value="java" /> | |
<property name="sonar.sources" value="src" /> | |
<property name="sonar.binaries" value="bin/classes" /> | |
<property name="sonar.tests" value="../My-Project-Test/src" /> | |
<property name="sonar.profile" value="Android Lint" /> | |
<property name="sonar.sourceEncoding" value="UTF-8" /> | |
<!-- Define the SonarQube target --> | |
<target name="sonar" > | |
<taskdef resource="org/sonar/ant/antlib.xml" uri="antlib:org.sonar.ant" > | |
<classpath path="/usr/local/Cellar/ant/1.9.3/libexec/lib/sonar-ant-task-*.jar" /> | |
</taskdef> | |
<!-- Execute the SonarQube analysis --> | |
<sonar:sonar /> | |
</target> | |
<property file="local.properties" /> | |
<property file="ant.properties" /> | |
<property environment="env" /> | |
<condition property="sdk.dir" value="${env.ANDROID_HOME}"> | |
<isset property="env.ANDROID_HOME" /> | |
</condition> | |
<loadproperties srcFile="project.properties" /> | |
<!-- quick check on sdk.dir --> | |
<fail | |
message="sdk.dir is missing. Make sure to generate local.properties using 'android update project' or to inject it through the ANDROID_HOME environment variable." | |
unless="sdk.dir" | |
/> | |
<import file="custom_rules.xml" optional="true" /> | |
<!-- version-tag: 1 --> | |
<import file="${sdk.dir}/tools/ant/build.xml" /> | |
</project> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment