[5153] | 1 | <project name="nearclick" default="dist" basedir=".">
|
---|
[14003] | 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"/>
|
---|
[12780] | 6 | <property name="ant.build.javac.target" value="1.5"/>
|
---|
| 7 | <target name="init">
|
---|
[14003] | 8 | <mkdir dir="${plugin.build.dir}"/>
|
---|
[12780] | 9 | </target>
|
---|
| 10 | <target name="compile" depends="init">
|
---|
| 11 | <echo message="creating ${plugin.jar}"/>
|
---|
[14015] | 12 | <javac srcdir="src" classpath="${josm}" debug="true" destdir="${plugin.build.dir}">
|
---|
[14003] | 13 | <compilerarg value="-Xlint:deprecation"/>
|
---|
| 14 | <compilerarg value="-Xlint:unchecked"/>
|
---|
[12780] | 15 | </javac>
|
---|
| 16 | </target>
|
---|
[14003] | 17 | <target name="dist" depends="compile,revision">
|
---|
| 18 | <jar destfile="${plugin.jar}" basedir="${plugin.build.dir}">
|
---|
| 19 | <manifest>
|
---|
| 20 | <attribute name="Author" value="Imi, David Earl"/>
|
---|
| 21 | <attribute name="Plugin-Class" value="nearclick.NearClickPlugin"/>
|
---|
| 22 | <attribute name="Plugin-Date" value="${version.entry.commit.date}"/>
|
---|
| 23 | <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)."/>
|
---|
| 24 | <attribute name="Plugin-Link" value="http://wiki.openstreetmap.org/index.php/JOSM/Plugins/Nearclick"/>
|
---|
| 25 | <attribute name="Plugin-Mainversion" value="1465"/>
|
---|
| 26 | <attribute name="Plugin-Version" value="${version.entry.commit.revision}"/>
|
---|
| 27 | </manifest>
|
---|
| 28 | </jar>
|
---|
| 29 | </target>
|
---|
| 30 | <target name="revision">
|
---|
[12780] | 31 | <exec append="false" output="REVISION" executable="svn" failifexecutionfails="false">
|
---|
| 32 | <env key="LANG" value="C"/>
|
---|
| 33 | <arg value="info"/>
|
---|
| 34 | <arg value="--xml"/>
|
---|
| 35 | <arg value="."/>
|
---|
| 36 | </exec>
|
---|
| 37 | <xmlproperty file="REVISION" prefix="version" keepRoot="false" collapseAttributes="true"/>
|
---|
| 38 | <delete file="REVISION"/>
|
---|
| 39 | </target>
|
---|
| 40 | <target name="clean">
|
---|
[14003] | 41 | <delete dir="${plugin.build.dir}"/>
|
---|
| 42 | <delete file="${plugin.jar}"/>
|
---|
[12780] | 43 | </target>
|
---|
| 44 | <target name="install" depends="dist">
|
---|
[14003] | 45 | <property environment="env"/>
|
---|
| 46 | <condition property="josm.plugins.dir" value="${env.APPDATA}/JOSM/plugins" else="${user.home}/.josm/plugins">
|
---|
| 47 | <and>
|
---|
| 48 | <os family="windows"/>
|
---|
| 49 | </and>
|
---|
| 50 | </condition>
|
---|
| 51 | <copy file="${plugin.jar}" todir="${josm.plugins.dir}"/>
|
---|
[12780] | 52 | </target>
|
---|
[3789] | 53 | </project>
|
---|