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.xml 4.5KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131
  1. <?xml version="1.0"?>
  2. <project name="vaadin-themes" basedir="." default="publish-local"
  3. xmlns:ivy="antlib:org.apache.ivy.ant">
  4. <description>
  5. Themes compiled to CSS
  6. </description>
  7. <include file="../common.xml" as="common" />
  8. <include file="../build.xml" as="vaadin" />
  9. <include file="../gwt-files.xml" as="gwtfiles" />
  10. <!-- global properties -->
  11. <property name="module.name" value="vaadin-themes" />
  12. <property name="module.symbolic" value="com.vaadin.themes" />
  13. <property name="result.dir" value="result" />
  14. <property name="theme.result.dir" value="${result.dir}/VAADIN/themes/" />
  15. <union id="jar.includes">
  16. <fileset dir="${result.dir}">
  17. <include name="VAADIN/themes/**" />
  18. <exclude name="VAADIN/themes/*-tests*/**" />
  19. <exclude name="VAADIN/themes/tests-*/**" />
  20. </fileset>
  21. </union>
  22. <target name="compile-themes">
  23. <ivy:resolve log="download-only" resolveid="common"
  24. conf="build" />
  25. <ivy:cachepath pathid="classpath.compile.theme"
  26. conf="build" />
  27. <antcall target="compile-theme">
  28. <param name="theme" value="base" />
  29. </antcall>
  30. <antcall target="compile-theme">
  31. <param name="theme" value="runo" />
  32. </antcall>
  33. <antcall target="compile-theme">
  34. <param name="theme" value="reindeer" />
  35. </antcall>
  36. <antcall target="compile-theme">
  37. <param name="theme" value="chameleon" />
  38. </antcall>
  39. <antcall target="compile-theme">
  40. <param name="theme" value="liferay" />
  41. </antcall>
  42. <antcall target="compile-theme">
  43. <param name="theme" value="valo" />
  44. </antcall>
  45. </target>
  46. <target name="jar" depends="compile-themes">
  47. <antcall target="common.jar">
  48. <param name="osgi.extra.package.prefixes" value="VAADIN/themes" />
  49. <reference torefid="extra.jar.includes" refid="jar.includes" />
  50. </antcall>
  51. </target>
  52. <target name="copy-theme">
  53. <fail unless="theme"
  54. message="You must give the theme name to copy n the 'theme' parameter" />
  55. <property name="theme.source.dir" location="../WebContent/VAADIN/themes/${theme}/" />
  56. <copy todir="${theme.result.dir}/${theme}">
  57. <fileset dir="${theme.source.dir}">
  58. <include name="**/*.scss" />
  59. </fileset>
  60. <filterset refid="filter-vaadin.version" />
  61. </copy>
  62. <copy todir="${theme.result.dir}/${theme}">
  63. <fileset dir="${theme.source.dir}">
  64. <exclude name="**/*.scss" />
  65. </fileset>
  66. </copy>
  67. </target>
  68. <target name="compile-theme" depends="copy-theme">
  69. <fail unless="theme"
  70. message="You must give the theme name to compile in the 'theme' parameter" />
  71. <ivy:resolve log="download-only" resolveid="common"
  72. conf="compile-theme" />
  73. <ivy:cachepath pathid="classpath.compile.theme"
  74. conf="compile-theme" />
  75. <ivy:cachepath pathid="classpath.runtime.theme"
  76. conf="build" />
  77. <echo>Compiling ${theme}</echo>
  78. <mkdir dir="${theme.result.dir}" />
  79. <!-- compile the theme -->
  80. <java classname="com.vaadin.buildhelpers.CompileTheme"
  81. classpathref="classpath.compile.theme" failonerror="yes"
  82. fork="yes" maxmemory="512m">
  83. <arg value="--theme" />
  84. <arg value="${theme}" />
  85. <arg value="--theme-folder" />
  86. <arg value="${theme.result.dir}" />
  87. <arg value="--version" />
  88. <arg value="${vaadin.version}" />
  89. <jvmarg value="-Xss8M" />
  90. <jvmarg value="-XX:MaxPermSize=256M" />
  91. <jvmarg value="-Djava.awt.headless=true" />
  92. </java>
  93. <!-- Compress theme to serve using gzip -->
  94. <gzip src="${theme.result.dir}/${theme}/styles.css"
  95. destfile="${theme.result.dir}/${theme}/styles.css.gz" />
  96. </target>
  97. <target name="publish-local" depends="jar">
  98. <antcall target="common.publish-local">
  99. </antcall>
  100. </target>
  101. <target name="clean">
  102. <antcall target="common.clean" />
  103. </target>
  104. <target name="checkstyle">
  105. <echo>No java files in module</echo>
  106. </target>
  107. <target name="test" depends="checkstyle">
  108. <!--<antcall target="common.test.run" /> -->
  109. <echo>WHAT? No tests for ${module.name}!</echo>
  110. </target>
  111. </project>