I'm using the following in a Plugin extending 'java' plugin for 0.9-rc-1 -
uploading to a maven repo:

void apply(Project target){
...
        target.task(['type': Zip], 'sourceJar') {
            baseName = baseName + "-src"
            extension = 'jar'
            from target.sourceSets.main.java,
target.sourceSets.main.resources
        }

        target.artifacts {
            archives(target.sourceJar) {classifier = 'sources'}
        }
...
}


should be translatable to a build.gradle script
regards
gretar

Reply via email to