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.

BuildPlugins.xml 2.1KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  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="/usr/share/java/ant-contrib.jar"/>
  4. <!-- Netbeans property files -->
  5. <property file="nbproject/project.properties"/>
  6. <property file="nbproject/private/private.properties"/>
  7. <property file="${user.properties.file}"/>
  8. <available file="${libs.antcontrib}.disabled" property="has.ant-contrib"/>
  9. <taskdef resource="net/sf/antcontrib/antcontrib.properties">
  10. <classpath>
  11. <pathelement location="${libs.antcontrib}"/>
  12. </classpath>
  13. </taskdef>
  14. <target name="makepluginjar">
  15. <propertyregex property="pluginjar.name" input="${target.file}" regexp=".*[\\/](.*)$" select="\1.jar" casesensitive="false" />
  16. <propertyregex property="folder.name" input="${target.file}" regexp=".*${build.classes.dir}/(.*)$" select="\1" casesensitive="false" />
  17. <if>
  18. <available file="${src.dir}/${folder.name}/.ignore"/>
  19. <then>
  20. <echo message="Not building: ${folder.name}" />
  21. </then>
  22. <else>
  23. <echo message="Building: ${folder.name} to ${pluginjar.name}"/>
  24. <delete file="plugins/${pluginjar.name}"/>
  25. <jar jarfile="plugins/${pluginjar.name}" basedir="build/classes" includes="${folder.name}/**/*.class ${folder.name}/**/*.png">
  26. <metainf file="${target.file}/plugin.info"/>
  27. </jar>
  28. </else>
  29. </if>
  30. </target>
  31. <target name="build-plugins" depends="build-plugins_bash, build-plugins_ant-contrib"/>
  32. <available file="/bin/bash" property="has.bash"/>
  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>