forked from openrocket/openrocket
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.xml
121 lines (100 loc) · 3.51 KB
/
build.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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
<project name="OpenRocket" basedir="." default="jar">
<!-- CLEAN -->
<target name="clean" depends="clean-core, clean-swing">
</target>
<target name="clean-core">
<ant dir="core" target="clean"/>
</target>
<target name="clean-swing">
<ant dir="swing" target="clean"/>
</target>
<!-- BUILD -->
<target name="build" depends="build-core, build-swing">
</target>
<target name="build-core">
<ant dir="core" target="build"/>
</target>
<target name="build-swing" depends="jar-core">
<ant dir="swing" target="build"/>
</target>
<!-- JAR -->
<target name="jar" depends="jar-core,jar-swing">
</target>
<target name="jar-core" depends="build-core">
<ant dir="core" target="jar"/>
</target>
<target name="jar-swing" depends="build-swing">
<ant dir="swing" target="jar"/>
</target>
<!-- TEST -->
<target name="unittest" depends="unittest-core, unittest-swing">
</target>
<target name="unittest-core" depends="jar-core">
<ant dir="core" target="unittest" inheritAll="false" />
</target>
<target name="unittest-swing" depends="jar-swing">
<ant dir="swing" target="unittest" inheritAll="false" />
</target>
<!-- CHECK -->
<target name="check" depends="checktodo,checkascii"/>
<!-- CHECK TODOs -->
<target name="todo" depends="checktodo"/>
<target name="checktodo">
<tempfile property="todo.file" prefix="checktodo-" destDir="${basedir}"/>
<echo>Checking project for FIXMEs.</echo>
<concat destfile="${todo.file}">
<fileset dir="core/src">
<include name="**/*.java"/>
</fileset>
<fileset dir="core/test">
<include name="**/*.java"/>
</fileset>
<fileset dir="swing/src">
<include name="**/*.java"/>
</fileset>
<fileset dir="swing/test">
<include name="**/*.java"/>
</fileset>
<filterchain>
<linecontainsregexp>
<regexp pattern="(FIXME|TODO:.*CRITICAL)"/>
</linecontainsregexp>
</filterchain>
</concat>
<loadfile srcfile="${todo.file}" property="criticaltodos"/>
<delete file="${todo.file}"/>
<fail if="criticaltodos">CRITICAL TODOs exist in project:
${criticaltodos}</fail>
<echo>No critical TODOs in project.</echo>
</target>
<!-- CHECK ASCII -->
<target name="ascii" depends="checkascii"/>
<target name="checkascii">
<tempfile property="ascii.file" prefix="checkascii-" destDir="${basedir}"/>
<echo>Checking project for non-ASCII characters.</echo>
<concat destfile="${ascii.file}">
<fileset dir="core/src">
<include name="**/*.java"/>
</fileset>
<fileset dir="core/test">
<include name="**/*.java"/>
</fileset>
<fileset dir="swing/src">
<include name="**/*.java"/>
</fileset>
<fileset dir="swing/test">
<include name="**/*.java"/>
</fileset>
<filterchain>
<linecontainsregexp>
<regexp pattern="\P{ASCII}"/>
</linecontainsregexp>
</filterchain>
</concat>
<loadfile srcfile="${ascii.file}" property="nonascii"/>
<delete file="${ascii.file}"/>
<fail if="nonascii">Non-ASCII characters exist in project:
${nonascii}</fail>
<echo>No non-ASCII characters in project.</echo>
</target>
</project>