You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

build-plugins.xml 2.4KB

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