1 | <project name="surveyor" default="dist" basedir=".">
|
---|
2 | <property name="josm" location="../../core/dist/josm-custom.jar" />
|
---|
3 | <property name="plugin.dist.dir" value="../../dist"/>
|
---|
4 | <property name="plugin.build.dir" value="build"/>
|
---|
5 | <property name="plugin.jar" value="${plugin.dist.dir}/${ant.project.name}.jar"/>
|
---|
6 | <property name="livegpsplugin.jar" value="${plugin.dist.dir}/livegps.jar"/>
|
---|
7 | <property name="ant.build.javac.target" value="1.5"/>
|
---|
8 | <target name="init">
|
---|
9 | <mkdir dir="${plugin.build.dir}"/>
|
---|
10 | </target>
|
---|
11 | <target name="compile" depends="init">
|
---|
12 | <echo message="creating ${plugin.jar}"/>
|
---|
13 | <javac srcdir="src" destdir="${plugin.build.dir}" debug="true">
|
---|
14 | <compilerarg value="-Xlint:deprecation"/>
|
---|
15 | <compilerarg value="-Xlint:unchecked"/>
|
---|
16 | <classpath>
|
---|
17 | <pathelement location="${josm}"/>
|
---|
18 | <pathelement location="${livegpsplugin.jar}"/>
|
---|
19 | </classpath>
|
---|
20 | </javac>
|
---|
21 | </target>
|
---|
22 | <target name="dist" depends="compile">
|
---|
23 | <exec append="false" output="REVISION" executable="svn" failifexecutionfails="false">
|
---|
24 | <env key="LANG" value="C"/>
|
---|
25 | <arg value="info"/>
|
---|
26 | <arg value="--xml"/>
|
---|
27 | <arg value="."/>
|
---|
28 | </exec>
|
---|
29 | <xmlproperty file="REVISION" prefix="version" keepRoot="false" collapseAttributes="true"/>
|
---|
30 | <delete file="REVISION"/>
|
---|
31 | <copy todir="${plugin.build.dir}/">
|
---|
32 | <fileset dir="resources">
|
---|
33 | <include name="*.xml"/>
|
---|
34 | <include name="audio/*"/>
|
---|
35 | </fileset>
|
---|
36 | </copy>
|
---|
37 | <copy todir="${plugin.build.dir}/images" >
|
---|
38 | <fileset dir="images" />
|
---|
39 | </copy>
|
---|
40 | <jar destfile="${plugin.jar}" basedir="${plugin.build.dir}">
|
---|
41 | <manifest>
|
---|
42 | <attribute name="Plugin-Class" value="at.dallermassl.josm.plugin.surveyor.SurveyorPlugin" />
|
---|
43 | <attribute name="Plugin-Description" value="Allow adding markers/nodes on current gps positions." />
|
---|
44 | <attribute name="Plugin-Stage" value="60" />
|
---|
45 | <attribute name="Plugin-Version" value="${version.entry.commit.revision}"/>
|
---|
46 | <attribute name="Plugin-Date" value="${version.entry.commit.date}"/>
|
---|
47 | <attribute name="Plugin-Mainversion" value="1326" />
|
---|
48 | <attribute name="Plugin-Requires" value="livegps" />
|
---|
49 | </manifest>
|
---|
50 | </jar>
|
---|
51 | </target>
|
---|
52 | <target name="clean">
|
---|
53 | <delete dir="${plugin.build.dir}" />
|
---|
54 | <delete file="${plugin.jar}" />
|
---|
55 | </target>
|
---|
56 | </project>
|
---|