[5153] | 1 | <project name="nearclick" default="dist" basedir=".">
|
---|
[12780] | 2 | <!-- compilation properties -->
|
---|
| 3 | <property name="josm.build.dir" value="../../core"/>
|
---|
| 4 | <property name="josm.home.dir" value="${user.home}/.josm"/>
|
---|
| 5 | <property name="josm" location="../../core/dist/josm-custom.jar" />
|
---|
| 6 | <property name="plugin.build.dir" value="build"/>
|
---|
| 7 | <property name="plugin.dist.dir" value="../../dist"/>
|
---|
| 8 | <property name="plugin.name" value="${ant.project.name}"/>
|
---|
| 9 | <property name="plugin.jar" value="../../dist/${plugin.name}.jar"/>
|
---|
| 10 | <!-- There's no josm.jar in the svn, so point "josm" to a local copy of your JOSM binary -->
|
---|
| 11 | <property name="josm" location="../../core/dist/josm-custom.jar" />
|
---|
| 12 | <!-- target directory to place the plugin in -->
|
---|
| 13 | <!-- Windows has a different home directory scheme then unix/linux -->
|
---|
| 14 | <!-- I don't know an automatic way to find it with ant :-(, if you know, please fix -->
|
---|
| 15 | <!--<property name="plugins" location="${user.home}/.josm/plugins" ></property>-->
|
---|
| 16 | <property name="plugins" location="${user.home}/Application Data/JOSM/plugins" ></property>
|
---|
| 17 | <!-- you should not need to modify anything below this! -->
|
---|
| 18 | <property name="ant.build.javac.target" value="1.5"/>
|
---|
| 19 | <target name="init">
|
---|
| 20 | <mkdir dir="build"></mkdir>
|
---|
| 21 | </target>
|
---|
| 22 | <target name="compile" depends="init">
|
---|
| 23 | <echo message="creating ${plugin.jar}"/>
|
---|
| 24 | <javac srcdir="src" target="1.5" classpath="${josm}" destdir="build" debug="true">
|
---|
| 25 | <include name="**/*.java" />
|
---|
| 26 | </javac>
|
---|
| 27 | </target>
|
---|
| 28 | <target name="dist" depends="compile">
|
---|
| 29 | <!-- define the version of the jar file -->
|
---|
| 30 | <exec append="false" output="REVISION" executable="svn" failifexecutionfails="false">
|
---|
| 31 | <env key="LANG" value="C"/>
|
---|
| 32 | <arg value="info"/>
|
---|
| 33 | <arg value="--xml"/>
|
---|
| 34 | <arg value="."/>
|
---|
| 35 | </exec>
|
---|
| 36 | <xmlproperty file="REVISION" prefix="version" keepRoot="false" collapseAttributes="true"/>
|
---|
| 37 | <!-- delete intermediate file -->
|
---|
| 38 | <delete file="REVISION"/>
|
---|
| 39 | <jar destfile="${plugin.jar}" basedir="build">
|
---|
| 40 | <manifest>
|
---|
| 41 | <attribute name="Plugin-Class" value="nearclick.NearClickPlugin" />
|
---|
| 42 | <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)." />
|
---|
| 43 | <attribute name="Plugin-Version" value="${version.entry.commit.revision}"/>
|
---|
| 44 | <attribute name="Plugin-Date" value="${version.entry.commit.date}"/>
|
---|
| 45 | <attribute name="Plugin-Mainversion" value="1180" />
|
---|
| 46 | </manifest>
|
---|
| 47 | </jar>
|
---|
| 48 | </target>
|
---|
| 49 | <target name="clean">
|
---|
| 50 | <delete dir="${plugin.build.dir}" />
|
---|
| 51 | <delete file="${plugin.jar}" />
|
---|
| 52 | </target>
|
---|
| 53 | <target name="clean_install">
|
---|
| 54 | <delete file="${plugins}/nearclick.jar" />
|
---|
| 55 | </target>
|
---|
| 56 | <target name="install" depends="dist">
|
---|
| 57 | <copy file="${plugin.jar}" todir="${plugins}"/>
|
---|
| 58 | </target>
|
---|
[3789] | 59 | </project>
|
---|