See #9128 for details. We need an update to the Gradle plugin to support this.

Comment From: wilkinsona

We need to do this for war files as well.

Comment From: wilkinsona

Maybe not. Only theJar layout is a RepackagingLayout on the Maven side of things. Exploding a war has the same problem as exploding a jar so it may be something that we want to support in the future.