// build.gradle (library) task sourcesJar(type: Jar, dependsOn:classes) { classifier = 'sources' from sourceSets.main.allSource } artifacts { archives sourcesJar } def releaseDir = file(releaseRepositoryDir).absolutePath uploadArchives { repositories { add(new org.apache.ivy.plugins.resolver.FileSystemResolver()) { name = "release" m2compatible = true addIvyPattern "${releaseDir}/[organisation]/[m