mirror of
https://github.com/corda/corda.git
synced 2025-04-14 22:46:57 +00:00
Added documentation for the new publishing functionality of publish-utils.
This commit is contained in:
parent
41b0b6c0b1
commit
a6d1a07670
@ -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 = <your bintray username>
|
||||
key = <your bintray 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 = <your bintray GPG key passphrase> // 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
|
||||
}
|
||||
}
|
||||
|
@ -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
|
||||
}
|
@ -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
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user