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.

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192
  1. <?xml version="1.0"?>
  2. <project xmlns:antcontrib="antlib:net.sf.antcontrib" xmlns:artifact="antlib:org.apache.maven.artifact.ant" xmlns:ivy="antlib:org.apache.ivy.ant" name="Build script for IDE users" basedir=".." default="theme-and-default-widgetset">
  3. <property name="work.dir" location="work" />
  4. <property file="build.properties" />
  5. <!-- Setting this to 0 disables the parallel compilation -->
  6. <property name="threadsPerProcessor" value="1" />
  7. <target name="resolve" unless="resolve.done">
  8. <ivy:resolve log="download-only" file="client-compiler/ivy.xml" conf="ide" />
  9. <ivy:cachepath pathid="client-compiler.deps" conf="ide" />
  10. <ivy:resolve log="download-only" file="server/ivy.xml" conf="ide" />
  11. <ivy:cachepath pathid="server.deps" conf="ide" />
  12. <ivy:resolve log="download-only" file="client/ivy.xml" conf="ide" />
  13. <ivy:cachepath pathid="client.deps" conf="ide" />
  14. <ivy:resolve log="download-only" file="shared/ivy.xml" conf="ide" />
  15. <ivy:cachepath pathid="shared.deps" conf="ide" />
  16. <ivy:resolve log="download-only" file="uitest/ivy.xml" conf="ide" />
  17. <ivy:cachepath pathid="uitest.deps" conf="ide" />
  18. <ivy:resolve log="download-only" file="buildhelpers/ivy.xml" />
  19. <ivy:cachepath pathid="buildhelpers.deps" />
  20. <ivy:resolve log="download-only" file="gwt/ivy.xml" conf="ide" />
  21. <ivy:cachepath pathid="gwt.deps" conf="ide" />
  22. <path id="classpath">
  23. <path location="bin" />
  24. <path location="build/classes" />
  25. <path refid="client-compiler.deps" />
  26. <path refid="server.deps" />
  27. <path refid="shared.deps" />
  28. <path refid="client.deps" />
  29. <path refid="buildhelpers.deps" />
  30. <path refid="gwt.deps" />
  31. <path refid="uitest.deps" />
  32. <path location="server/src" />
  33. <path location="shared/src" />
  34. <path location="uitest/src" />
  35. <path location="client/src" />
  36. </path>
  37. <property name="resolve.done" value="true" />
  38. </target>
  39. <target name="theme-and-default-widgetset" depends="resolve">
  40. <!-- threadCount is ignored unless threadsPerProcessor is 0 -->
  41. <parallel threadsPerProcessor="${threadsPerProcessor}" threadCount="1">
  42. <antcall target="default-widgetset" inheritRefs="true" />
  43. <antcall target="themes" inheritRefs="true" />
  44. <antcall target="vaadinPush.js" inheritRefs="true" />
  45. </parallel>
  46. </target>
  47. <target name="themes" depends="resolve">
  48. <!-- threadCount is ignored unless threadsPerProcessor is 0 -->
  49. <parallel threadsPerProcessor="${threadsPerProcessor}" threadCount="1">
  50. <antcall target="compile-theme" inheritRefs="true">
  51. <param name="theme" value="base" />
  52. </antcall>
  53. <antcall target="compile-theme" inheritRefs="true">
  54. <param name="theme" value="runo" />
  55. </antcall>
  56. <antcall target="compile-theme" inheritRefs="true">
  57. <param name="theme" value="reindeer" />
  58. </antcall>
  59. <antcall target="compile-theme" inheritRefs="true">
  60. <param name="theme" value="chameleon" />
  61. </antcall>
  62. <antcall target="compile-theme" inheritRefs="true">
  63. <param name="theme" value="liferay" />
  64. </antcall>
  65. <antcall target="compile-theme" inheritRefs="true">
  66. <param name="theme" value="valo" />
  67. </antcall>
  68. <antcall target="compile-theme" inheritRefs="true">
  69. <param name="theme" value="tests-valo" />
  70. </antcall>
  71. <antcall target="compile-theme" inheritRefs="true">
  72. <param name="theme" value="tests-valo-dark" />
  73. </antcall>
  74. <antcall target="compile-theme" inheritRefs="true">
  75. <param name="theme" value="tests-valo-metro" />
  76. </antcall>
  77. <antcall target="compile-theme" inheritRefs="true">
  78. <param name="theme" value="tests-valo-flat" />
  79. </antcall>
  80. <antcall target="compile-theme" inheritRefs="true">
  81. <param name="theme" value="tests-valo-flatdark" />
  82. </antcall>
  83. <antcall target="compile-theme" inheritRefs="true">
  84. <param name="theme" value="tests-valo-facebook" />
  85. </antcall>
  86. <antcall target="compile-theme" inheritRefs="true">
  87. <param name="theme" value="tests-valo-blueprint" />
  88. </antcall>
  89. <antcall target="compile-theme" inheritRefs="true">
  90. <param name="theme" value="tests-valo-light" />
  91. </antcall>
  92. <antcall target="compile-theme" inheritRefs="true">
  93. <param name="theme" value="tests-valo-disabled-animations" />
  94. </antcall>
  95. </parallel>
  96. </target>
  97. <target name="compile-theme" depends="resolve">
  98. <java classname="com.vaadin.buildhelpers.CompileTheme" failonerror="yes" fork="yes">
  99. <classpath refid="classpath" />
  100. <jvmarg value="-Djava.awt.headless=true" />
  101. <arg value="--theme" />
  102. <arg value="${theme}" />
  103. <arg value="--theme-folder" />
  104. <arg value="WebContent/VAADIN/themes" />
  105. <arg value="--version" />
  106. <arg value="${vaadin.version}" />
  107. </java>
  108. </target>
  109. <target name="default-widgetset">
  110. <antcall target="compile-widgetset" inheritRefs="true">
  111. <param name="widgetset" value="com.vaadin.DefaultWidgetSet" />
  112. </antcall>
  113. </target>
  114. <target name="testing-widgetset">
  115. <antcall target="compile-widgetset" inheritRefs="true">
  116. <param name="widgetset" value="com.vaadin.tests.widgetset.TestingWidgetSet" />
  117. </antcall>
  118. </target>
  119. <target name="compile-widgetset" depends="resolve">
  120. <property name="module" value="${widgetset}" />
  121. <property name="module.output.dir" location="WebContent/VAADIN/widgetsets" />
  122. <property name="logLevel" value="TRACE" />
  123. <property name="style" value="PRETTY" />
  124. <property name="localWorkers" value="2" />
  125. <!-- Whether assertions should be compiled into the widgetset.
  126. Either "-ea" to enable or "" to disable. -->
  127. <property name="assertions" value="-ea" />
  128. <property name="extraParams" value="" />
  129. <property name="gwt.usearchives" value="true" />
  130. <property name="gwt.persistentunitcache" value="false" />
  131. <mkdir dir="${module.output.dir}" />
  132. <echo>Compiling ${module} to ${module.output.dir} with parameters -logLevel ${logLevel} -style ${style} -localWorkers ${localWorkers} ${assertions} -strict ${extraParams}</echo>
  133. <!--<ivy:resolve log="download-only" inline="true" organisation="javax.validation" module="validation-api"
  134. revision="1.0.0.GA"/> -->
  135. <!-- compile the module -->
  136. <java classname="com.google.gwt.dev.Compiler" classpathref="classpath" failonerror="yes" fork="yes" maxmemory="512m">
  137. <arg value="-workDir" />
  138. <arg value="${work.dir}" />
  139. <arg value="-logLevel" />
  140. <arg value="${logLevel}" />
  141. <arg value="-war" />
  142. <arg value="${module.output.dir}" />
  143. <arg value="-style" />
  144. <arg value="${style}" />
  145. <arg value="-localWorkers" />
  146. <arg value="${localWorkers}" />
  147. <arg line="${assertions}" />
  148. <arg value="-strict" />
  149. <arg line="${extraParams}" />
  150. <arg value="${module}" />
  151. <sysproperty key="vFailIfNotSerializable" value="true" />
  152. <jvmarg value="-Xss8M" />
  153. <jvmarg value="-Xmx1G" />
  154. <jvmarg value="-XX:MaxPermSize=256M" />
  155. <jvmarg value="-Djava.awt.headless=true" />
  156. <jvmarg value="-Dgwt.usearchives=${gwt.usearchives}" />
  157. <jvmarg value="-Dgwt.persistentunitcache=${gwt.persistentunitcache}" />
  158. </java>
  159. </target>
  160. <target name="vaadinPush.js" depends="resolve">
  161. <ant antfile="${basedir}/push/build.xml" target="vaadinPush.js" dir="${basedir}/push" />
  162. <property name="js.output.dir" location="WebContent" />
  163. <property name="push.js.dir" location="${basedir}/push/result/js" />
  164. <copy todir="${js.output.dir}">
  165. <fileset dir="${push.js.dir}" includes="VAADIN/vaadinPush*">
  166. </fileset>
  167. </copy>
  168. </target>
  169. <target name="clean-unitcache">
  170. <delete dir="WebContent/VAADIN/gwt-unitCache" />
  171. </target>
  172. </project>