corda/gradle-plugins/publish-utils
Clinton Alexander 7858a76542 Merged in clint-gpgpassword (pull request #541)
Due to updated GPG key that requires a passphrase a passphrase block has been added.
2016-11-24 18:24:46 +00:00
..
src/main Publishing to jcenter possible via bintrayUpload (with the correct credentials) and corda now has a dependency on the published gradle plugin to allow the split. 2016-11-18 13:02:04 +00:00
build.gradle Merged in clint-gpgpassword (pull request #541) 2016-11-24 18:24:46 +00:00
README.rst Fixed review issues. 2016-10-11 13:05:46 +01:00

Publish Utils

Publishing utilities adds a couple of tasks to any project it is applied to that hide some boilerplate that would otherwise be placed in the Cordapp template's build.gradle.

There are two tasks exposed: sourceJar and javadocJar and both return a FileCollection.

It is used within the publishing block of a build.gradle as such;

// This will publish the sources, javadoc, and Java components to Maven.
// See the `maven-publish` plugin for more info: https://docs.gradle.org/current/userguide/publishing_maven.html
publishing {
    publications {
        jarAndSources(MavenPublication) {
            from components.java
            // The two lines below are the tasks added by this plugin.
            artifact sourceJar
            artifact javadocJar
        }
    }
}