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 5.5KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150
  1. <?xml version="1.0"?>
  2. <project name="vaadin-client-compiled" basedir="." default="publish-local"
  3. xmlns:ivy="antlib:org.apache.ivy.ant">
  4. <description>
  5. Compiled (JS+HTML) version of client side
  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-client-compiled" />
  12. <property name="module.symbolic" value="com.vaadin.client-compiled" />
  13. <property name="result.dir" value="result" />
  14. <property name="gwtar.dir" location="${result.dir}/gwtar" />
  15. <property name="work.dir" location="${result.dir}/work" />
  16. <property name="module.output.dir" location="${result.dir}/VAADIN/widgetsets" />
  17. <property name="compiled.jar"
  18. location="${result.dir}/lib/${module.name}-${vaadin.version}.jar" />
  19. <property name="compiled-cache.jar"
  20. location="${result.dir}/lib/${module.name}-cache-${vaadin.version}.jar" />
  21. <union id="jar.includes">
  22. <fileset dir="${result.dir}">
  23. <include name="VAADIN/widgetsets/com.vaadin*/**" />
  24. </fileset>
  25. </union>
  26. <target name="default-widgetset-cache">
  27. <antcall target="compile-module-cache">
  28. <param name="module" value="com.vaadin.DefaultWidgetSet" />
  29. </antcall>
  30. </target>
  31. <target name="default-widgetset">
  32. <antcall target="compile-module">
  33. <param name="module" value="com.vaadin.DefaultWidgetSet" />
  34. </antcall>
  35. </target>
  36. <target name="compile-module-cache">
  37. <fail unless="module"
  38. message="You must give the module to compile in the 'module' parameter" />
  39. <ivy:resolve log="download-only" resolveid="common"
  40. conf="compile-module" />
  41. <ivy:cachepath pathid="classpath.compile.widgetset"
  42. conf="compile-module" />
  43. <echo>Creating gwtar files for ${module} in ${gwtar.dir}</echo>
  44. <!-- Produce gwtar files for the separate JAR -->
  45. <java classname="com.google.gwt.dev.CompileModule"
  46. classpathref="classpath.compile.widgetset" failonerror="yes"
  47. fork="yes" maxmemory="512m">
  48. <arg value="-out" />
  49. <arg value="${gwtar.dir}" />
  50. <arg value="-strict" />
  51. <arg value="${module}" />
  52. <jvmarg value="-Xss8M" />
  53. <jvmarg value="-XX:MaxPermSize=256M" />
  54. <jvmarg value="-Djava.awt.headless=true" />
  55. </java>
  56. </target>
  57. <target name="compile-module">
  58. <fail unless="module"
  59. message="You must give the module to compile in the 'module' parameter" />
  60. <property name="style" value="OBF" />
  61. <property name="localWorkers" value="6" />
  62. <property name="extraParams" value="" />
  63. <ivy:resolve log="download-only" resolveid="common"
  64. conf="compile-module" />
  65. <ivy:cachepath pathid="classpath.compile.widgetset"
  66. conf="compile-module" />
  67. <mkdir dir="${module.output.dir}" />
  68. <echo>Compiling ${module} to ${module.output.dir}</echo>
  69. <!-- compile the module -->
  70. <java classname="com.google.gwt.dev.Compiler" classpathref="classpath.compile.widgetset"
  71. failonerror="yes" fork="yes" maxmemory="512m">
  72. <classpath location="${compiled-cache.jar}" />
  73. <arg value="-workDir" />
  74. <arg value="${work.dir}" />
  75. <arg value="-logLevel" />
  76. <arg value="TRACE" />
  77. <arg value="-war" />
  78. <arg value="${module.output.dir}" />
  79. <arg value="-style" />
  80. <arg value="${style}" />
  81. <arg value="-localWorkers" />
  82. <arg value="${localWorkers}" />
  83. <arg value="-strict" />
  84. <!-- Disabled for now as it breaks code, e.g. ButtonWithShortcutNotRendered -->
  85. <!-- <arg value="-XenableClosureCompiler" /> -->
  86. <arg line="${extraParams}" />
  87. <arg value="${module}" />
  88. <sysproperty key="vFailIfNotSerializable" value="true" />
  89. <jvmarg value="-Xss8M" />
  90. <jvmarg value="-XX:MaxPermSize=256M" />
  91. <jvmarg value="-Djava.awt.headless=true" />
  92. </java>
  93. </target>
  94. <target name="client-compiled-cache.jar" depends="default-widgetset-cache">
  95. <jar file="${compiled-cache.jar}" compress="true">
  96. <fileset dir="${gwtar.dir}">
  97. <include name="**/*.gwtar" />
  98. </fileset>
  99. <union refid="client-compiled-cache.gwt.includes" />
  100. <!-- <fileset dir="${common.jarfiles.dir}" /> -->
  101. </jar>
  102. </target>
  103. <target name="jar" depends="default-widgetset">
  104. <antcall target="common.jar">
  105. <param name="osgi.extra.package.prefixes" value="VAADIN/widgetsets/" />
  106. <param name="osgi.includeNumberPackages" value="1" />
  107. <reference torefid="extra.jar.includes" refid="jar.includes" />
  108. </antcall>
  109. </target>
  110. <target name="publish-local" depends="jar">
  111. <antcall target="common.publish-local">
  112. <param name="conf" value="build" />
  113. </antcall>
  114. </target>
  115. <target name="clean">
  116. <antcall target="common.clean" />
  117. </target>
  118. <target name="checkstyle">
  119. <echo>No java files in module</echo>
  120. </target>
  121. <target name="test" depends="checkstyle">
  122. <!--<antcall target="common.test.run" /> -->
  123. <echo>WHAT? No tests for ${module.name}!</echo>
  124. </target>
  125. </project>