War file gets included in another war file

I have two web (war) projects A and B.
B depends on A.
When I build B, A gets included as A.jar in WEB-INF of B as expected.

I am also using Gadle’s eclipse and eclipseWtp plugins to generate Eclipse projects.
When I deploy B on Tomcat via Eclipse, and browse to the deployment directory, I find A.war instead of A.jar in B's WEB-INF directory. This obviously won’t work. Besides, if A has other JAR dependencies, even those are not included in WEB-INF of B.

I have created a simple test for this. It can be downloaded from the link below.

Download Link: Test Projects and Build Script

Gradle Version:

Gradle 2.4

Build time: 2015-05-05 08:09:24 UTC
Build number: none
Revision: 5c9c3bc20ca1c281ac7972643f1e2d190f2c943c

Groovy: 2.3.10
Ant: Apache Ant™ version 1.9.4 compiled on April 29 2014
JVM: 1.8.0_40 (Oracle Corporation 25.40-b25)
OS: Windows 7 6.1 amd64

This bug makes Gradle unusable for such projects. Does nobody have a solution for this bug?