|
@@ -1,62 +1,18 @@
|
1
|
1
|
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
2
|
<project name="DMDirc-plugins" default="default" basedir=".">
|
3
|
3
|
|
4
|
|
- <!-- ant-contrib default location (can be overridden in the property files below)-->
|
5
|
|
- <property name="libs.antcontrib" value="/usr/share/java/ant-contrib.jar"/>
|
6
|
|
-
|
7
|
4
|
<!-- Netbeans property files -->
|
8
|
5
|
<property file="nbproject/project.properties"/>
|
9
|
6
|
<property file="nbproject/private/private.properties"/>
|
10
|
7
|
<property file="${user.properties.file}"/>
|
11
|
|
- <available file="${libs.antcontrib}.disabled" property="has.ant-contrib"/>
|
12
|
|
-
|
13
|
|
- <taskdef resource="net/sf/antcontrib/antcontrib.properties">
|
14
|
|
- <classpath>
|
15
|
|
- <pathelement location="${libs.antcontrib}"/>
|
16
|
|
- </classpath>
|
17
|
|
- </taskdef>
|
18
|
8
|
|
|
9
|
+ <target name="build-plugins" depends="-build-plugins_bash" description="Build all plugins"/>
|
19
|
10
|
|
20
|
|
- <target name="-makepluginjar">
|
21
|
|
- <propertyregex property="pluginjar.name" input="${target.file}" regexp=".*[\\/](.*)$" select="\1.jar" casesensitive="false" />
|
22
|
|
- <propertyregex property="folder.name" input="${target.file}" regexp=".*${build.classes.dir}/(.*)$" select="\1" casesensitive="false" />
|
23
|
|
-
|
24
|
|
- <if>
|
25
|
|
- <available file="${src.dir}/${folder.name}/.ignore"/>
|
26
|
|
- <then>
|
27
|
|
- <echo message="Not building: ${folder.name}" />
|
28
|
|
- </then>
|
29
|
|
- <else>
|
30
|
|
- <echo message="Building: ${folder.name} to ${pluginjar.name}"/>
|
31
|
|
- <delete file="plugins/${pluginjar.name}"/>
|
32
|
|
- <jar jarfile="plugins/${pluginjar.name}" basedir="build/classes" includes="${folder.name}/**/*.class ${folder.name}/**/*.png">
|
33
|
|
- <metainf file="${target.file}/plugin.info"/>
|
34
|
|
- </jar>
|
35
|
|
- </else>
|
36
|
|
- </if>
|
37
|
|
- </target>
|
38
|
|
-
|
39
|
|
- <target name="build-plugins"
|
40
|
|
- depends="-build-plugins_bash, -build-plugins_ant-contrib"
|
41
|
|
- description="Build all plugins. "/>
|
42
|
|
-
|
43
|
|
- <target name="-build-plugins_bash" unless="has.ant-contrib" if="has.bash">
|
|
11
|
+ <target name="-build-plugins_bash" if="has.bash">
|
44
|
12
|
<exec executable="/bin/bash">
|
45
|
13
|
<arg value="createAllPluginJar.sh"/>
|
46
|
14
|
<arg value="${src.dir}/com/dmdirc/addons/"/>
|
47
|
15
|
</exec>
|
48
|
16
|
</target>
|
49
|
17
|
|
50
|
|
- <target name="-build-plugins_ant-contrib" if="has.ant-contrib">
|
51
|
|
- <mkdir dir="plugins/"/>
|
52
|
|
- <foreach target="-makepluginjar" param="target.file">
|
53
|
|
- <path>
|
54
|
|
- <dirset dir="${build.classes.dir}/com/dmdirc/addons/">
|
55
|
|
- <include name="**/*"/>
|
56
|
|
- <exclude name="**/*/*/**"/>
|
57
|
|
- </dirset>
|
58
|
|
- </path>
|
59
|
|
- </foreach>
|
60
|
|
- </target>
|
61
|
|
-
|
62
|
18
|
</project>
|