[2130] | 1 | <project name="slippymap" default="dist" basedir=".">
|
---|
| 2 |
|
---|
[5153] | 3 |
|
---|
[5422] | 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 |
|
---|
[5153] | 12 | <!-- compilation properties -->
|
---|
| 13 | <property name="josm.build.dir" value="../../core"/>
|
---|
[5422] | 14 | <property name="josm.plugins.dir" value="${josm.home.dir}/plugins"/>
|
---|
[5153] | 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"/>
|
---|
[5197] | 20 |
|
---|
| 21 | <property name="ant.build.javac.target" value="1.5"/>
|
---|
[5153] | 22 |
|
---|
| 23 |
|
---|
[5147] | 24 | <target name="dist" depends="compile">
|
---|
| 25 | <!-- images -->
|
---|
| 26 | <copy todir="build/images">
|
---|
| 27 | <fileset dir="images" />
|
---|
| 28 | </copy>
|
---|
[5153] | 29 |
|
---|
[5147] | 30 | <!-- create josm-custom.jar -->
|
---|
[5153] | 31 | <jar destfile="${plugin.jar}" basedir="build">
|
---|
[5147] | 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>
|
---|
[2130] | 38 |
|
---|
[5147] | 39 | <target name="compile" depends="init">
|
---|
| 40 | <javac srcdir="slippymap" classpath="../../core/dist/josm-custom.jar" destdir="build" />
|
---|
| 41 | </target>
|
---|
[5153] | 42 |
|
---|
[5147] | 43 | <target name="init">
|
---|
[5153] | 44 | <mkdir dir="${plugin.build.dir}" />
|
---|
[5147] | 45 | </target>
|
---|
[5153] | 46 |
|
---|
[5147] | 47 | <target name="clean">
|
---|
[5153] | 48 | <delete dir="${plugin.build.dir}" />
|
---|
| 49 | <delete file="${plugin.jar}" />
|
---|
[5147] | 50 | </target>
|
---|
[5153] | 51 |
|
---|
[5422] | 52 | <target name="install" depends="dist">
|
---|
| 53 | <copy file="${plugin.jar}" todir="${josm.plugins.dir}"/>
|
---|
| 54 | </target>
|
---|
| 55 |
|
---|
[2130] | 56 | </project>
|
---|