Skip to content

Instantly share code, notes, and snippets.

@Axxiss
Axxiss / custom_rules.xml
Created November 30, 2012 10:23
Checkstyle target definition
<target name="checkstyle"
description="Generates a report of code convention violations.">
<fail
message="checkstyle.home is missing. Make sure to add it as an argument."
unless="checkstyle.home" />
<path id="checkstyle.path">
<fileset dir="${checkstyle.home}" includes="*.jar" />
</path>
@Axxiss
Axxiss / custom_rules.xml
Created November 29, 2012 08:48
PMD target definition
<target name="pmd">
<fail
message="pmd.home is missing. Make sure to add it as an argument."
unless="pmd.home"
/>
<path id="pmd.path">
<fileset dir="${pmd.home}/lib" includes="*.jar" />
</path>
@Axxiss
Axxiss / custom_rules.xml
Created November 29, 2012 08:48
PMD target definition
<target name="pmd">
<fail
message="pmd.home is missing. Make sure to add it as an argument."
unless="pmd.home"
/>
<path id="pmd.path">
<fileset dir="${pmd.home}/lib" includes="*.jar" />
</path>
@Axxiss
Axxiss / custom_rules.xml
Created November 26, 2012 09:18
Findbugs taskdef and target
<target name="findbugs" description="Generate the FindBugs XML report">
<fail
message="findbugs.home is missing. Make sure to add it as an argument."
unless="findbugs.home"
/>
<path id="findbugs.jar">
<pathelement path="${findbugs.home}/lib/findbugs-ant.jar">
</pathelement>
@Axxiss
Axxiss / custom_rules.xml
Created November 26, 2012 08:35
Download junit report from AVD
<target name="init-props">
<xpath input="${tested.project.dir}/AndroidManifest.xml"
expression="/manifest/@package" output="tested.project.app.package"/>
</target>
<target name="fetch-test-report" depends="init-props">
<echo>Downloading XML test report...</echo>
<mkdir dir="reports"/>
<exec executable="${adb}" failonerror="true">
<arg line="${adb.device.arg}"/>
@Axxiss
Axxiss / android-test-and.sh
Created October 24, 2012 21:09
android test ant configuration
android update test-project --path /path/project/tests --name MyProject
ant -Dadb.device.arg='-s ID-dispositivo' debug install
@Axxiss
Axxiss / jenkins-permission.sh
Created October 20, 2012 20:44
Jenkins repo permission
sudo su - jenkins
cd .ssh
ssh-keygen -t rsa -C "jenkins-ci@nuestro-host.com"
git config --global user.email "jenkins-ci@nuestro-host.com"
git config --global user.name "Jenkins CI"
@Axxiss
Axxiss / jenkins-android-properties.txt
Created October 20, 2012 20:37
Jenkins android properties
sdk.dir=/opt/android-sdk-linux
target=android-8
@Axxiss
Axxiss / android-ant.sh
Created October 20, 2012 20:30
Android ant project config
android update project --path ./ --name MyProject
@Axxiss
Axxiss / AndroidManifest.xml
Created May 21, 2012 13:38
sync service manifest
<service
android:name=".sync.SyncService"
android:exported="true" >
<intent-filter>
<action android:name="android.content.SyncAdapter" />
</intent-filter>
<meta-data
android:name="android.content.SyncAdapter"
android:resource="@xml/syncadapter" />
</service>