I am using the following ant task to compile my GWT stuff:
<target name="GWTcompile">
<mkdir dir="C:/web/www" />
<java classname="com.google.gwt.dev.GWTCompiler" fork="true">
<classpath>
<pathelement path="C:/src/java/" />
<pathelement location="C:/gwt/gwt-user.jar" />
<pathelement location="C:/gwt/gwt-dev-linux.jar" />
</classpath>
<arg value="-out" />
<arg value="C:/web/www" />
<arg value="com.xyz.gwt.GetData" />
</java>
</target>
When I compiled it fresh, i.e., compiled for the first time, I got
following message displayed on console:
GWTcompile:
[mkdir] Created dir: C:/web/www
[java] Output will be written into C:/www/com.xyz.gwt.GetData
[java] Copying all files found on public path
[java] Compilation succeeded
BUILD SUCCESSFUL
Now without changing any code file when I recompiled it with same ant
target I got following display on console:
GWTcompile:
[java] Output will be written into C:/www/com.xyz.gwt.GetData
[java] Compilation succeeded
BUILD SUCCESSFUL
So far so good. It appears as if it is not re-compiling the codebase
but following two things shook my belief:
1) It took almost same time as it took during first time compilation.
2) For every subsequent after first fresh build there was a time stamp
change for the file com.xyz.gwt.GetData.nocache.html lying at
C:/www/com.xyz.gwt.GetData, which essentially means that this file was
modified everytime, irrespective of code change.
Can anyone suggest any solution, which will check unneccessary
re-compilation of unmodified code and thus save build time.
Thanks,
Rahul
I think it would help us with such an ant task or command line
compiler.
One can fasten up the speed of compilation upto an extent by using
Compiler flag.
For details refer to:
http://groups.google.co.uk/group/Google-Web-Toolkit/browse_thread/thread/70d7d1f0c8f8a6ac/b9ccaecf00578150?tvc=2&q=compiler+faster&hl=en#b9ccaecf00578150
http://code.google.com/p/google-web-toolkit/issues/detail?id=42#c5
Rahul