Here is what I use to jar javadocs and sources... and I'll throw in getting them to upload to Maven repos just for good measure:

task sourcesJar(type: Jar, dependsOn:classes) {
    classifier = 'sources'
    from sourceSets.main.allSource
}

task javadocJar(type: Jar, dependsOn:javadoc) {
    classifier = 'javadoc'
    from javadoc.destinationDir
}

// This requires gradle 0.9...
artifacts {
    archives sourcesJar
    archives javadocJar
}


mjparme wrote:
I am trying to create a jar file for the JavaDoc of my project. I am using
the java plugin and that produces the javadoc but not a jar of those java
docs.

So I am trying something like this:

task packageJavadoc(type: Jar, dependsOn: 'javadoc') {
    fileSet(dir: 'build/docs/javadoc')
}

This actually runs successfully but doesn't actually produce a Jar file (if
it is producing one I can't find it). So surely there is a way for me to
specify the name of the Jar file and a path to write it in?
So my question is really how can I find out which options are available for
a task of type Jar?
With Gradle there doesn't seem to be any reference you go to like the core
Ant task reference. For that matter how do I know what task types are
available for the "type:" parameter? Where is that documentation?


---------------------------------------------------------------------
To unsubscribe from this list, please visit:

   http://xircles.codehaus.org/manage_email


Reply via email to