gradle/gradle — pull request #265 by benmccann (2014-04-07 01:52:04+00:00)
Title: Use standard ivy layout pattern in ivy support

Gradle's ivy-publish plugin uses a non-standard ivy layout pattern. I found a [mailing list post](http://gradle.1045684.n5.nabble.com/Standard-patterns-for-ivy-repositories-td4793222.html) where this feature was implemented and the developer asked if anyone knew if there was a standard layout. They weren't sure what the default ivy layout was and so used the maven layout. However, there is indeed a default ivy layout and it is different than the Maven layout. The fact that Gradle does not properly implement this makes it very difficult to interoperate with other tools. I was able to fix it by specificying the layout as shown below. I would love to see Gradle's non-standard default be updated to the standard layout so that it will work with other tools.

publishing {
publications {
ivyJava(IvyPublication) {
from components.java
}
}
repositories {
ivy {
url "${System.properties['user.home']}/.ivy2/local"
layout 'pattern', {
artifact '[organisation]/[module]/[revision]/[ext]s/[artifact](.[ext])'
ivy '[organisation]/[module]/[revision]/[artifact]/[artifact](.[ext])'
}
}
}
}

You can see this is what is defined in [ivysettings-local.xml](http://grepcode.com/file/repository.springsource.com/org.apache.ant/com.springsource.org.apache.ivy/2.1.0/org/apache/ivy/core/settings/ivysettings-local.xml) except ivy has a [type] which gradle does not support so I had to replace it with [ext] and [artifact] in order to get the same result.