Browse Source

Added BuildPlugins.xml

If ant-contrib-1.0b3.jar is present in the current dir (or elsewhere as specified by libs.antcontrib in nbproject/private/private.properties or so), this can be used to automatically build all the plugin jar files using ant -buildfile BuildPlugins.xml build-plugins


git-svn-id: http://svn.dmdirc.com/trunk@2663 00569f92-eb28-0410-84fd-f71c24880f
tags/0.5.5
Shane Mc Cormack 16 years ago
parent
commit
ef7d14c7cf
1 changed files with 38 additions and 0 deletions
  1. 38
    0
      BuildPlugins.xml

+ 38
- 0
BuildPlugins.xml View File

@@ -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>

Loading…
Cancel
Save