diff --git a/gradle-plugins/publish-utils/README.rst b/gradle-plugins/publish-utils/README.rst index e75667abc9..3399688602 100644 --- a/gradle-plugins/publish-utils/README.rst +++ b/gradle-plugins/publish-utils/README.rst @@ -23,3 +23,70 @@ It is used within the `publishing` block of a build.gradle as such; } } +Bintray Publishing +------------------ + +For large multibuild projects it can be inconvenient to store the entire configuration for bintray and maven central +per project (with a bintray and publishing block with extended POM information). Publish utils can bring the number of +configuration blocks down to one in the ideal scenario. + +To use this plugin you must first apply it to both the root project and any project that will be published with + +.. code-block:: text + + apply plugin: 'net.corda.plugins.publish-utils' + +Next you must setup the general bintray configuration you wish to use project wide, for example: + +.. code-block:: text + + bintrayConfig { + user = + key = + repo = 'example repo' + org = 'example organisation' + licenses = ['a license'] + vcsUrl = 'https://example.com' + projectUrl = 'https://example.com' + gpgSign = true // Whether to GPG sign + gpgPassphrase = // Only required if gpgSign is true and your key is passworded + publications = ['example'] // a list of publications (see below) + license { + name = 'example' + url = 'https://example.com' + distribution = 'repo' + } + developer { + id = 'a developer id' + name = 'a developer name' + email = 'example@example.com' + } + } + +.. note:: You can currently only have one license and developer in the maven POM sections + +**Publications** + +This plugin assumes, by default, that publications match the name of the project. This means, by default, you can +just list the names of the projects you wish to publish (eg; to publish `test:myapp` you need `publications = ['myapp']`. +If a project requires a different name you can configure it *per project* with the project configuration block. + +The project configuration block has the following structure; + +.. code-block:: text + + publish { + name = 'non-default-project-name' + disableDefaultJar = false // set to true to disable the default JAR being created (eg; when creating a fat JAR) + } + +**Artifacts** + +To add additional artifacts to the project you can use the default gradle `artifacts` block with the `publish` +configuration. For example: + + artifacts { + publish buildFatJar { + // You can configure this as a regular maven publication + } + } diff --git a/gradle-plugins/publish-utils/src/main/groovy/net/corda/plugins/bintray/Developer.groovy b/gradle-plugins/publish-utils/src/main/groovy/net/corda/plugins/bintray/Developer.groovy index 1f8df63ece..1d66f68c7d 100644 --- a/gradle-plugins/publish-utils/src/main/groovy/net/corda/plugins/bintray/Developer.groovy +++ b/gradle-plugins/publish-utils/src/main/groovy/net/corda/plugins/bintray/Developer.groovy @@ -1,7 +1,16 @@ package net.corda.plugins.bintray class Developer { + /** + * A unique identifier the developer (eg; organisation ID) + */ String id + /** + * The full name of the developer + */ String name + /** + * An email address for contacting the developer + */ String email } \ No newline at end of file diff --git a/gradle-plugins/publish-utils/src/main/groovy/net/corda/plugins/bintray/License.groovy b/gradle-plugins/publish-utils/src/main/groovy/net/corda/plugins/bintray/License.groovy index ca03d4ade4..1d06867bcf 100644 --- a/gradle-plugins/publish-utils/src/main/groovy/net/corda/plugins/bintray/License.groovy +++ b/gradle-plugins/publish-utils/src/main/groovy/net/corda/plugins/bintray/License.groovy @@ -1,7 +1,16 @@ package net.corda.plugins.bintray class License { + /** + * The name of license (eg; Apache 2.0) + */ String name + /** + * URL to the full license file + */ String url + /** + * The distribution level this license corresponds to (eg: repo) + */ String distribution } \ No newline at end of file