[1955] | 1 | <project name="livegps" default="dist" basedir=".">
|
---|
[5153] | 2 |
|
---|
[5420] | 3 | <!-- josm "user home" directory depends on the platform used (windows has a different place than unix/linux) -->
|
---|
| 4 | <property environment="env"/>
|
---|
| 5 | <condition property="josm.home.dir" value="${env.APPDATA}/JOSM" else="${user.home}/.josm">
|
---|
| 6 | <and>
|
---|
| 7 | <os family="windows"/>
|
---|
| 8 | </and>
|
---|
| 9 | </condition>
|
---|
| 10 |
|
---|
[3410] | 11 | <!-- compilation properties -->
|
---|
[6709] | 12 | <!--<property name="josm.build.dir" value="../../JOSM/"/> -->
|
---|
| 13 | <property name="josm.build.dir" value="../../core/"/>
|
---|
[5420] | 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"/>
|
---|
[6100] | 17 | <property name="plugin.dist.dir" value="../../dist"/>
|
---|
[5153] | 18 | <property name="plugin.name" value="${ant.project.name}"/>
|
---|
[6100] | 19 | <property name="plugin.jar" value="../../dist/${plugin.name}.jar"/>
|
---|
[5153] | 20 |
|
---|
[6100] | 21 | <property name="plugin.jar" value="../../dist/${plugin.name}.jar"/>
|
---|
[5147] | 22 | <property name="livegpsplugin.jar" value="${josm.home.dir}/plugins/livegps.jar"/>
|
---|
| 23 |
|
---|
| 24 | <!-- plugin meta data (enter new version number if anything changed!) -->
|
---|
| 25 | <property name="plugin.description" value="Allow live GPS feed from a gpsd server (V${plugin.version})."/>
|
---|
| 26 | <property name="plugin.stage" value="50"/>
|
---|
| 27 | <property name="plugin.class" value="livegps.LiveGpsPlugin"/>
|
---|
| 28 |
|
---|
| 29 | <!-- update site meta data -->
|
---|
| 30 | <property name="plugin.site.file" value="josm-site.xml"/>
|
---|
| 31 | <property name="plugin.site.description" value="Josm's LiveGps Update Site"/>
|
---|
| 32 | <property name="plugin.site.url" value="http://www.tegmento.org/~cdaller/josm/livegps/"/>
|
---|
| 33 | <property name="plugin.site.upload.target" value="cdaller@www.tegmento.org:public_html/josm/livegps/"/>
|
---|
| 34 |
|
---|
[5197] | 35 | <property name="ant.build.javac.target" value="1.5"/>
|
---|
[1955] | 36 |
|
---|
[11936] | 37 | <target name="init">
|
---|
| 38 | <mkdir dir="${plugin.build.dir}"/>
|
---|
| 39 | </target>
|
---|
| 40 |
|
---|
| 41 | <target name="dist" depends="compile">
|
---|
[3073] | 42 | <!-- images -->
|
---|
| 43 | <copy todir="${plugin.build.dir}/images">
|
---|
| 44 | <fileset dir="images" />
|
---|
[6709] | 45 | </copy>
|
---|
[11936] | 46 | <exec append="false" output="REVISION" executable="svn" failifexecutionfails="false">
|
---|
| 47 | <env key="LANG" value="C"/>
|
---|
| 48 | <arg value="info"/>
|
---|
| 49 | <arg value="--xml"/>
|
---|
| 50 | <arg value="."/>
|
---|
| 51 | </exec>
|
---|
| 52 | <xmlproperty file="REVISION" prefix="version" keepRoot="false" collapseAttributes="true"/>
|
---|
| 53 | <delete file="REVISION"/>
|
---|
| 54 |
|
---|
[3410] | 55 | <!-- create jar file -->
|
---|
| 56 | <jar destfile="${plugin.jar}" basedir="${plugin.build.dir}">
|
---|
[3073] | 57 | <manifest>
|
---|
[3410] | 58 | <attribute name="Plugin-Class" value="${plugin.class}" />
|
---|
| 59 | <attribute name="Plugin-Description" value="${plugin.description}" />
|
---|
[12598] | 60 | <attribute name="Plugin-Mainversion" value="1180" />
|
---|
[11936] | 61 | <attribute name="Plugin-Version" value="${version.entry.commit.revision}"/>
|
---|
| 62 | <attribute name="Plugin-Date" value="${version.entry.commit.date}"/>
|
---|
[3410] | 63 | <!--attribute name="Plugin-Dependencies" value="org.eigenheimstrasse.josm" /-->
|
---|
| 64 | <attribute name="Plugin-Stage" value="${plugin.stage}" />
|
---|
[3073] | 65 | </manifest>
|
---|
| 66 | </jar>
|
---|
| 67 | </target>
|
---|
[1955] | 68 |
|
---|
[3073] | 69 | <target name="compile" depends="init">
|
---|
| 70 | <javac srcdir="livegps" destdir="${plugin.build.dir}" debug="true" source="1.5" target="1.5">
|
---|
[11934] | 71 | <compilerarg value="-Xlint:deprecation"/>
|
---|
[3073] | 72 | <classpath>
|
---|
| 73 | <pathelement path="${josm.build.dir}/build"/>
|
---|
| 74 | <fileset dir="${josm.build.dir}/lib">
|
---|
[7287] | 75 | <include name="../core/build/josm.jar"/>
|
---|
[3073] | 76 | <include name="**/*.jar"/>
|
---|
| 77 | </fileset>
|
---|
[5153] | 78 | <pathelement location="${plugin.jar}"/>
|
---|
[3073] | 79 | </classpath>
|
---|
| 80 | </javac>
|
---|
| 81 | </target>
|
---|
[1955] | 82 |
|
---|
[3073] | 83 | <target name="install" depends="dist">
|
---|
[5420] | 84 | <copy file="${plugin.jar}" todir="${josm.plugins.dir}"/>
|
---|
[6709] | 85 | <copy file="liveGPS.conf" todir="${josm.plugins.dir}/livegps/" />
|
---|
[3073] | 86 | </target>
|
---|
[1955] | 87 |
|
---|
[3073] | 88 | <target name="clean">
|
---|
| 89 | <delete dir="${plugin.build.dir}" />
|
---|
[5153] | 90 | <delete file="${plugin.jar}" />
|
---|
[3073] | 91 | </target>
|
---|
[1955] | 92 | </project>
|
---|