I’m using 1.6; when I do “gradle install”, it copies my main artifacts up to the local repository … but I’ve gotten lost in the documentation trying to figure out how to get the source artifacts uploaded as well.
FYI, from my build.gradle:
configurations {
// Non-code artifacts, such as sources JARs and zipped JavaDocs
meta
}
task sourcesJar(type: Jar) {
dependsOn classes
classifier "sources"
from sourceSets.main.allSource
from(projectDir) {
include "*.txt"
into "META-INF"
}
}
artifacts {
meta sourcesJar
}
Found it …
artifacts {
archives sourcesJar
}