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 | <javac srcdir="src" target="1.5" classpath="${josm}" destdir="build" debug="true">
|
---|
34 | <include name="**/*.java" />
|
---|
35 | </javac>
|
---|
36 | </target>
|
---|
37 |
|
---|
38 | <target name="dist" depends="compile">
|
---|
39 | <!-- define the version of the jar file -->
|
---|
40 | <exec append="false" output="REVISION" executable="svn" failifexecutionfails="false">
|
---|
41 | <env key="LANG" value="C"/>
|
---|
42 | <arg value="info"/>
|
---|
43 | <arg value="--xml"/>
|
---|
44 | <arg value="."/>
|
---|
45 | </exec>
|
---|
46 | <xmlproperty file="REVISION" prefix="version" keepRoot="false" collapseAttributes="true"/>
|
---|
47 | <!-- delete intermediate file -->
|
---|
48 | <delete file="REVISION"/>
|
---|
49 | <jar destfile="${plugin.jar}" basedir="build">
|
---|
50 | <manifest>
|
---|
51 | <attribute name="Plugin-Class" value="nearclick.NearClickPlugin" />
|
---|
52 | <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)." />
|
---|
53 | <attribute name="Plugin-Version" value="${version.entry.commit.revision}"/>
|
---|
54 | </manifest>
|
---|
55 | </jar>
|
---|
56 | </target>
|
---|
57 |
|
---|
58 | <target name="clean">
|
---|
59 | <delete dir="${plugin.build.dir}" />
|
---|
60 | <delete file="${plugin.jar}" />
|
---|
61 | </target>
|
---|
62 |
|
---|
63 | <target name="clean_install">
|
---|
64 | <delete file="${plugins}/nearclick.jar" />
|
---|
65 | </target>
|
---|
66 |
|
---|
67 | <target name="install" depends="dist">
|
---|
68 | <copy file="${plugin.jar}" todir="${plugins}"/>
|
---|
69 | </target>
|
---|
70 |
|
---|
71 | </project>
|
---|