forked from grails/grails-doc
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.xml
98 lines (81 loc) · 3.89 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
<project name="grails-docs" default="dist">
<property file="local.properties" />
<property name="base.dir" value="." />
<target name="init">
<condition property="grails.home.was.set">
<isset property="grails.home"/>
</condition>
<!-- grails.home may be set interactively, which would take precedence over this... -->
<property name="grails.home" value="checkout/grails-src"/>
</target>
<target name="grails-javadoc"
description="Generate most current javadoc for Grails"
depends="init">
<ant dir="${grails.home}" target="javadoc" />
<mkdir dir="${base.dir}/output" />
<copy todir="${base.dir}/output" failonerror="false">
<fileset dir="${grails.home}/doc" />
</copy>
</target>
<property environment="env" />
<target name="clean" description="Delete output">
<delete dir="output" />
<delete dir="checkout" />
</target>
<target name="distclean" depends="clean"
description="Delete everything generated and retrieved">
<delete dir="${base.dir}/bin" />
<delete dir="${base.dir}/dist" />
</target>
<target name="docs"
description="Generate the Grails Guide and Reference docs"
depends="init, get-grails">
<taskdef name="groovyc" classname="org.codehaus.groovy.ant.Groovyc">
<classpath>
<fileset dir="${grails.home}/lib" includes="*.jar" />
<fileset dir="${base.dir}/lib" />
<pathelement location="${base.dir}/bin" />
</classpath>
</taskdef>
<mkdir dir="${base.dir}/bin" />
<copy todir="${base.dir}/bin" file="resources/log4j.properties"/>
<groovyc srcdir="${base.dir}/src/groovy" destdir="bin">
<classpath>
<fileset dir="${grails.home}/lib" includes="*.jar" />
<fileset dir="${base.dir}/lib" />
<pathelement location="${base.dir}/bin" />
</classpath>
</groovyc>
<mkdir dir="${base.dir}/output" />
<java classname="groovy.ui.GroovyMain" failonerror="true">
<arg value="${base.dir}/Generate.groovy" />
<sysproperty key="base.dir" value="${base.dir}"/>
<sysproperty key="grails.home" value="${grails.home}"/>
<classpath>
<fileset dir="${grails.home}/lib" includes="*.jar" />
<fileset dir="${base.dir}/lib" />
<pathelement location="${base.dir}/bin" />
</classpath>
</java>
</target>
<target name="dist-nojavadoc" depends="init, docs">
<property file="${grails.home}/build.properties"/>
<mkdir dir="${base.dir}/dist" />
<delete failonerror="false">
<fileset dir="${base.dir}/dist" includes="*.zip" />
</delete>
<zip destfile="${base.dir}/dist/grails-docs-${grails.version}.zip" basedir="output"/>
</target>
<target name="dist" depends="init, grails-javadoc,docs"
description="Build documentation and create a zip for distibution">
</target>
<target name="get-grails" unless="grails.home.was.set" depends="init">
<mkdir dir="checkout"/>
<echo message="Downloading Grails source code. If you already have a copy of the Grails source code checked out you can avoid this download by setting the grails.home system property to point to your local copy of the source. See README.txt for more information."/>
<get src="http://nodeload.github.com/grails/grails-core/zipball/master" dest="checkout/grails-src.zip" verbose="true"/>
<unzip src="checkout/grails-src.zip" dest="checkout">
<mapper type="regexp" from="(grails-grails-core-\S*?/)(.*)" to="grails-src/\2"/>
</unzip>
<echo message="Grails source code has been downloaded to checkout/grails-src/"/>
</target>
</project>