| 1 | <project name="slippymap" default="dist" basedir=".">
|
|---|
| 2 |
|
|---|
| 3 |
|
|---|
| 4 | <!-- josm "user home" directory depends on the platform used (windows has a different place than unix/linux) -->
|
|---|
| 5 | <property environment="env"/>
|
|---|
| 6 | <condition property="josm.home.dir" value="${env.APPDATA}/JOSM" else="${user.home}/.josm">
|
|---|
| 7 | <and>
|
|---|
| 8 | <os family="windows"/>
|
|---|
| 9 | </and>
|
|---|
| 10 | </condition>
|
|---|
| 11 |
|
|---|
| 12 | <!-- compilation properties -->
|
|---|
| 13 | <property name="josm.build.dir" value="../../core"/>
|
|---|
| 14 | <property name="josm.plugins.dir" value="${josm.home.dir}/plugins"/>
|
|---|
| 15 | <property name="josm" location="../../core/dist/josm-custom.jar" />
|
|---|
| 16 | <property name="plugin.build.dir" value="build"/>
|
|---|
| 17 | <property name="plugin.dist.dir" value="../dist"/>
|
|---|
| 18 | <property name="plugin.name" value="${ant.project.name}"/>
|
|---|
| 19 | <property name="plugin.jar" value="../dist/${plugin.name}.jar"/>
|
|---|
| 20 |
|
|---|
| 21 | <property name="ant.build.javac.target" value="1.5"/>
|
|---|
| 22 |
|
|---|
| 23 |
|
|---|
| 24 | <target name="dist" depends="compile">
|
|---|
| 25 | <!-- images -->
|
|---|
| 26 | <copy todir="build/images">
|
|---|
| 27 | <fileset dir="images" />
|
|---|
| 28 | </copy>
|
|---|
| 29 |
|
|---|
| 30 | <!-- create josm-custom.jar -->
|
|---|
| 31 | <jar destfile="${plugin.jar}" basedir="build">
|
|---|
| 32 | <manifest>
|
|---|
| 33 | <attribute name="Plugin-Class" value="slippymap.SlippyMapPlugin" />
|
|---|
| 34 | <attribute name="Plugin-Description" value="Displays a slippy map tile grid, and tile status info" />
|
|---|
| 35 | </manifest>
|
|---|
| 36 | </jar>
|
|---|
| 37 | </target>
|
|---|
| 38 |
|
|---|
| 39 | <target name="compile" depends="init">
|
|---|
| 40 | <javac srcdir="slippymap" classpath="../../core/dist/josm-custom.jar" destdir="build" />
|
|---|
| 41 | </target>
|
|---|
| 42 |
|
|---|
| 43 | <target name="init">
|
|---|
| 44 | <mkdir dir="${plugin.build.dir}" />
|
|---|
| 45 | </target>
|
|---|
| 46 |
|
|---|
| 47 | <target name="clean">
|
|---|
| 48 | <delete dir="${plugin.build.dir}" />
|
|---|
| 49 | <delete file="${plugin.jar}" />
|
|---|
| 50 | </target>
|
|---|
| 51 |
|
|---|
| 52 | <target name="install" depends="dist">
|
|---|
| 53 | <copy file="${plugin.jar}" todir="${josm.plugins.dir}"/>
|
|---|
| 54 | </target>
|
|---|
| 55 |
|
|---|
| 56 | </project>
|
|---|