-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathcustom_rules.xml
38 lines (31 loc) · 1.32 KB
/
custom_rules.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
<?xml version="1.0" encoding="UTF-8"?>
<project name="shaman-custom" basedir=".">
<dirname property="shaman-custom.basedir" file="${ant.file.shaman-custom}"/>
<property file="${user.home}/.android/build.properties"/>
<target name="release" depends="clean,android_rules.release,lint"/>
<target name="lint" description="Run lint checks">
<exec executable="lint"
dir="${shaman-custom.basedir}"
failonerror="true"
>
<arg value="--exitcode"/>
<arg value="-Werror"/>
<arg value="."/>
</exec>
</target>
<target name="checkstyle-init" unless="checkstyle.on">
<property name="artifacts.dir" location="${shaman-custom.basedir}/target"/>
<available classname="com.puppycrawl.tools.checkstyle.CheckStyleTask" property="checkstyle.enabled"/>
</target>
<target name="checkstyle" if="checkstyle.enabled" depends="checkstyle-init">
<taskdef resource="checkstyletask.properties"/>
<mkdir dir="${artifacts.dir}/checkstyle"/>
<checkstyle config="${shaman-custom.basedir}/checkstyle/shaman-checks.xml">
<fileset dir="${shaman-custom.basedir}/src">
<include name="**/*.java"/>
</fileset>
<formatter type="plain"/>
<formatter type="xml" toFile="${artifacts.dir}/checkstyle/${project.name}-errors.xml"/>
</checkstyle>
</target>
</project>