Sources not installed to local maven repository with install task

(hlship) #1

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.

(hlship) #2

FYI, from my build.gradle:

configurations {
        // Non-code artifacts, such as sources JARs and zipped JavaDocs
      task sourcesJar(type: Jar) {
        dependsOn classes
        classifier "sources"
        from sourceSets.main.allSource
        from(projectDir) {
            include "*.txt"
            into "META-INF"
      artifacts {
        meta sourcesJar

(hlship) #3

Found it …

artifacts {
        archives sourcesJar