source: subversion/applications/editors/josm/plugins/nearclick/build.xml @ 12598

Last change on this file since 12598 was 12598, checked in by Dirk Stoecker, 11 years ago

updated version

File size: 3.0 KB
Line 
1<project name="nearclick" default="dist" basedir=".">
2
3  <!-- compilation properties -->
4  <property name="josm.build.dir"       value="../../core"/>
5  <property name="josm.home.dir"        value="${user.home}/.josm"/>
6  <property name="josm"                 location="../../core/dist/josm-custom.jar" />
7  <property name="plugin.build.dir"     value="build"/>
8  <property name="plugin.dist.dir"      value="../../dist"/>
9  <property name="plugin.name"          value="${ant.project.name}"/>
10  <property name="plugin.jar"           value="../../dist/${plugin.name}.jar"/>
11
12  <!-- There's no josm.jar in the svn, so point "josm" to a local copy of your JOSM binary -->
13  <property name="josm" location="../../core/dist/josm-custom.jar" />
14  <!--<property name="josm" location="../josm/josm-latest.jar" ></property>-->
15 
16  <!-- target directory to place the plugin in -->
17  <!-- Windows has a different home directory scheme then unix/linux -->
18  <!-- I don't know an automatic way to find it with ant :-(, if you know, please fix -->
19  <!--<property name="plugins" location="${user.home}/.josm/plugins" ></property>-->
20  <property name="plugins" location="${user.home}/Application Data/JOSM/plugins" ></property>
21
22  <!-- you should not need to modify anything below this! -->
23
24  <property name="ant.build.javac.target" value="1.5"/>
25
26
27  <target name="init">
28    <mkdir dir="build"></mkdir>
29    <mkdir dir="dist"></mkdir>
30  </target>
31
32  <target name="compile" depends="init">
33    <echo message="creating ${plugin.jar}"/>
34    <javac srcdir="src" target="1.5" classpath="${josm}" destdir="build" debug="true">
35      <include name="**/*.java" />
36    </javac>
37  </target>
38
39  <target name="dist" depends="compile">
40    <!-- define the version of the jar file -->
41    <exec append="false" output="REVISION" executable="svn" failifexecutionfails="false">
42      <env key="LANG" value="C"/>
43      <arg value="info"/>
44      <arg value="--xml"/>
45      <arg value="."/>
46    </exec>
47    <xmlproperty file="REVISION" prefix="version" keepRoot="false" collapseAttributes="true"/>
48        <!-- delete intermediate file -->
49    <delete file="REVISION"/>
50    <jar destfile="${plugin.jar}" basedir="build">
51      <manifest>
52        <attribute name="Plugin-Class" value="nearclick.NearClickPlugin" />
53        <attribute name="Plugin-Description" value="Simulates a click when you do a small and short drag. This is usefull for tablet pens, when you have problems just clicking the tablet without the mouse moving (general Java - tablet problem)." />
54        <attribute name="Plugin-Version" value="${version.entry.commit.revision}"/>
55        <attribute name="Plugin-Date" value="${version.entry.commit.date}"/>
56        <attribute name="Plugin-Mainversion" value="1180" />
57      </manifest>
58    </jar>
59  </target>
60
61  <target name="clean">
62    <delete dir="${plugin.build.dir}" />
63    <delete file="${plugin.jar}" />
64  </target>
65 
66  <target name="clean_install">
67    <delete file="${plugins}/nearclick.jar" />
68  </target>
69
70  <target name="install" depends="dist">
71    <copy file="${plugin.jar}" todir="${plugins}"/>
72  </target>
73
74</project>
Note: See TracBrowser for help on using the repository browser.