Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Branch: master
Fetching contributors…

Cannot retrieve contributors at this time

175 lines (151 sloc) 6.747 kB
<project name="geoscript.org" default="info" basedir=".">
<property name="repos" value="${basedir}/.repos"/>
<property name="t" value="&#x0009;"/>
<target name="info">
<echo message="Checks out GeoScript sources and builds the site. The built site is located in the build directory."/>
<echo message=""/>
<echo message="Available tasks:"/>
<echo message="${t}site: Build the entire site."/>
<echo message="${t}js-doc: Build the js docs (js-pull first)."/>
<echo message="${t}js-pull: Update js repo."/>
<echo message="${t}py-doc: Build the py docs (py-pull first)."/>
<echo message="${t}py-pull: Update py repo."/>
<echo message="${t}scala-doc: Build the scala docs (scala-pull first)."/>
<echo message="${t}scala-pull: Update scala repo."/>
<echo message="${t}groovy-doc: Build the groovy docs (groovy-pull first)."/>
<echo message="${t}groovy-pull: Update groovy repo."/>
<echo message="${t}init: Check out local git repos."/>
<echo message="${t}clean: Delete doc builds."/>
<echo message="${t}clean-full: Delete doc builds and local git repos."/>
</target>
<target name="init">
<mkdir dir="${basedir}/build"/>
<mkdir dir="${repos}"/>
<condition property="repo.js.exists">
<available file="${repos}/js"/>
</condition>
<condition property="repo.py.exists">
<available file="${repos}/py"/>
</condition>
<condition property="repo.scala.exists">
<available file="${repos}/scala"/>
</condition>
<condition property="repo.groovy.exists">
<available file="${repos}/groovy"/>
</condition>
</target>
<target name="init-js" depends="init">
<antcall target="js-clone"/>
</target>
<target name="js-clone" unless="repo.js.exists">
<exec executable="git" dir="${repos}">
<arg value="clone"/>
<arg value="git://github.com/tschaub/geoscript-js.git"/>
<arg value="js"/>
</exec>
</target>
<target name="js-pull" if="repo.js.exists" depends="init-js">
<exec executable="git" dir="${repos}/js">
<arg value="pull"/>
</exec>
</target>
<target name="js-doc" depends="init-js">
<exec executable="python">
<arg value="jsdoc.py"/>
<arg value="${repos}/js/lib/geoscript"/>
<arg value="${repos}/js/doc/api/module.jst"/>
<arg value="${repos}/js/doc/api"/>
</exec>
<exec executable="sphinx-build" dir="${basedir}/src">
<arg line="-E -b html -c ${basedir}/src -D html_title='GeoScript JS' -D html_short_title='GeoScript JS' -D html_theme=geoscript-js ${repos}/js/doc ${basedir}/build/js"/>
</exec>
</target>
<target name="init-py" depends="init">
<antcall target="py-clone"/>
</target>
<target name="py-clone" unless="repo.py.exists">
<exec executable="git" dir="${repos}">
<arg value="clone"/>
<arg value="git://github.com/jdeolive/geoscript-py.git"/>
<arg value="py"/>
</exec>
</target>
<target name="py-pull" if="repo.py.exists" depends="init-py">
<exec executable="git" dir="${repos}/py">
<arg value="pull"/>
</exec>
</target>
<target name="py-doc" depends="init-py">
<exec executable="sphinx-build" dir="${basedir}/src">
<arg line="-E -b html ${repos}/py/doc ${basedir}/build/py"/>
</exec>
</target>
<target name="init-scala" depends="init">
<antcall target="scala-clone"/>
</target>
<target name="scala-clone" unless="repo.scala.exists">
<exec executable="git" dir="${repos}">
<arg value="clone"/>
<arg value="git://github.com/dwins/geoscript.scala.git"/>
<arg value="scala"/>
</exec>
</target>
<target name="scala-pull" if="repo.scala.exists" depends="init-scala">
<exec executable="git" dir="${repos}/scala">
<arg value="pull"/>
</exec>
</target>
<target name="scala-doc" depends="init-scala">
<exec executable="sphinx-build" dir="${basedir}/src">
<arg line="-E -b html -c ${basedir}/src -D html_title='GeoScript Scala' -D html_short_title='GeoScript Scala' -D html_theme=geoscript-scala ${repos}/scala/docs ${basedir}/build/scala"/>
</exec>
<exec executable="sbt" dir="${repos}/scala/">
<arg value="update"/>
<arg value="doc"/>
</exec>
<move file="${repos}/scala/geoscript/target/scala_2.7.7/doc/main/api/"
todir="${basedir}/build/scala/"/>
</target>
<target name="init-groovy" depends="init">
<antcall target="groovy-clone"/>
</target>
<target name="groovy-clone" unless="repo.groovy.exists">
<exec executable="git" dir="${repos}">
<arg value="clone"/>
<arg value="git://github.com/jericks/geoscript-groovy.git"/>
<arg value="groovy"/>
</exec>
</target>
<target name="groovy-pull" if="repo.groovy.exists" depends="init-groovy">
<exec executable="git" dir="${repos}/groovy">
<arg value="pull"/>
</exec>
</target>
<target name="groovy-doc" depends="init-groovy">
<exec executable="sphinx-build" dir="${basedir}/src">
<arg line="-E -b html -c ${basedir}/src -D html_title='GeoScript Groovy' -D html_short_title='GeoScript Groovy' -D html_theme=geoscript-groovy ${repos}/groovy/doc ${basedir}/build/groovy"/>
</exec>
<exec executable="mvn" dir="${repos}/groovy/">
<arg line="-Dmaven.test.skip=true"/>
<arg line="package"/>
</exec>
<mkdir dir="${basedir}/build/groovy/api"/>
<copy todir="${basedir}/build/groovy/api">
<fileset dir="${repos}/groovy/target/groovydoc/">
<include name="**/*"/>
</fileset>
</copy>
</target>
<target name="site-doc" depends="init">
<exec executable="sphinx-build" dir="${basedir}/src" failonerror="true">
<arg line="-E -b html . ${basedir}/build"/>
</exec>
</target>
<target name="site" depends="js-pull, js-doc, py-pull, py-doc, scala-pull, scala-doc, groovy-pull, groovy-doc, site-doc"/>
<target name="clean">
<delete dir="${basedir}/build"/>
</target>
<target name="clean-full" depends="clean">
<delete dir="${repos}"/>
</target>
</project>
Jump to Line
Something went wrong with that request. Please try again.