|
@@ -0,0 +1,38 @@
|
|
1
|
+<project name="DMDirc-Plugins" default="default" basedir=".">
|
|
2
|
+ <!-- ant-contrib default location (can be overridden in the property files below)-->
|
|
3
|
+ <property name="libs.antcontrib" value="ant-contrib-1.0b3.jar"/>
|
|
4
|
+
|
|
5
|
+ <!-- Netbeans property files -->
|
|
6
|
+ <property file="nbproject/project.properties"/>
|
|
7
|
+ <property file="nbproject/private/private.properties"/>
|
|
8
|
+ <property file="${user.properties.file}"/>
|
|
9
|
+
|
|
10
|
+ <taskdef resource="net/sf/antcontrib/antcontrib.properties">
|
|
11
|
+ <classpath>
|
|
12
|
+ <pathelement location="${libs.antcontrib}"/>
|
|
13
|
+ </classpath>
|
|
14
|
+ </taskdef>
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+ <target name="makepluginjar">
|
|
18
|
+ <propertyregex property="pluginjar.name" input="${target.file}" regexp=".*[\\/](.*)$" select="\1.jar" casesensitive="false" />
|
|
19
|
+ <propertyregex property="folder.name" input="${target.file}" regexp=".*${build.classes.dir}/(.*)$" select="\1" casesensitive="false" />
|
|
20
|
+ <echo message="Building: ${folder.name} to ${pluginjar.name}"/>
|
|
21
|
+ <delete file="plugins/${pluginjar.name}"/>
|
|
22
|
+ <jar jarfile="plugins/${pluginjar.name}" basedir="build/classes" includes="${folder.name}/*.class">
|
|
23
|
+ <metainf file="${target.file}/plugin.info"/>
|
|
24
|
+ </jar>
|
|
25
|
+ </target>
|
|
26
|
+
|
|
27
|
+ <target name="build-plugins">
|
|
28
|
+ <mkdir dir="plugins/"/>
|
|
29
|
+ <foreach target="makepluginjar" param="target.file">
|
|
30
|
+ <path>
|
|
31
|
+ <dirset dir="${build.classes.dir}/com/dmdirc/addons/">
|
|
32
|
+ <include name="**/*"/>
|
|
33
|
+ <exclude name="**/*/*/**"/>
|
|
34
|
+ </dirset>
|
|
35
|
+ </path>
|
|
36
|
+ </foreach>
|
|
37
|
+ </target>
|
|
38
|
+</project>
|