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.6KB

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