1 | <project name="namefinder" 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 | <property name="ant.build.javac.target" value="1.5"/>
|
---|
13 |
|
---|
14 | <!-- init target -->
|
---|
15 | <target name="init">
|
---|
16 | <mkdir dir="${plugin.build.dir}" />
|
---|
17 | </target>
|
---|
18 |
|
---|
19 | <!-- clean target -->
|
---|
20 | <target name="clean">
|
---|
21 | <delete dir="${plugin.build.dir}" />
|
---|
22 | <delete file="${plugin.jar}" />
|
---|
23 | </target>
|
---|
24 |
|
---|
25 | <!-- compile target -->
|
---|
26 | <target name="compile" depends="init">
|
---|
27 | <javac srcdir="namefinder" destdir="${plugin.build.dir}" debug="true" source="1.5" target="1.5">
|
---|
28 | <classpath>
|
---|
29 | <pathelement path="${josm.build.dir}/build"/>
|
---|
30 | <pathelement path="${josm.build.dir}/src"/>
|
---|
31 | <fileset dir="${josm.build.dir}/lib">
|
---|
32 | <include name="**/*.jar"/>
|
---|
33 | </fileset>
|
---|
34 | </classpath>
|
---|
35 | </javac>
|
---|
36 | </target>
|
---|
37 |
|
---|
38 | <!-- dist target - create jar file -->
|
---|
39 | <target name="dist" depends="compile">
|
---|
40 | <jar destfile="${plugin.jar}" basedir="${plugin.build.dir}">
|
---|
41 | <manifest>
|
---|
42 | <attribute name="Plugin-Class" value="namefinder.NameFinderPlugin" />
|
---|
43 | <attribute name="Plugin-Description" value="Allows selection of download areas by name, using an external service" />
|
---|
44 | <attribute name="Plugin-Version" value="1.0" />
|
---|
45 | </manifest>
|
---|
46 | </jar>
|
---|
47 | </target>
|
---|
48 |
|
---|
49 | <!-- install target - copy jar file to plugin destination -->
|
---|
50 | <target name="install" depends="dist">
|
---|
51 | <copy file="../dist/${ant.project.name}.jar" todir="${josm.home.dir}/plugins" />
|
---|
52 | </target>
|
---|
53 |
|
---|
54 | </project>
|
---|
55 |
|
---|