I noticed today that gradle corrupts all images in the project when running “gradle war” task. My system is: ------------------------------------------------------------ Gradle 1.10 ------------------------------------------------------------
Build time:
2013-12-17 09:28:15 UTC Build number: none Revision:
36ced393628875ff15575fa03d16c1349ffe8bb6
Groovy:
1.8.6 Ant:
Apache Ant™ version 1.9.2 compiled on July 8 2013 Ivy:
2.2.0 JVM:
1.7.0_45 (Oracle Corporation 24.45-b08) OS:
Mac OS X 10.9.1 x86_64
All the files in src/main/webapp are ok. When I run ‘gradle war’ I get the appropriate war file in build/libs directory. When I unzip that file and inspect images all of them have weird sizes (image that should have 84KB in the war file it has ~150KB, and cannot be opened in any editor).
I managed to work around this issue. If I use specific enough filter in filesMathing (i.e. src/main/webapp/WEB-INF/*.xml than I don’t see the issue. With the filer specified in my previous post I still see the issue.