Skip to content

Latest commit

Β 

History

History
700 lines (438 loc) Β· 18.8 KB

jreleaser-gradle.adoc

File metadata and controls

700 lines (438 loc) Β· 18.8 KB

JReleaser Gradle Plugin

Executes a JReleaser workflow as a Gradle plugin.

Note
Requires Gradle 6.x.

Install

build.gradle
plugins {
    id 'org.jreleaser' version '{jreleaser-version}'
}

Configuration

JReleaser may be configured using the Gradle DSL shown at configuration:index.adoc. Alternatively, an external configuration file may be used if the configFile field property is set in the jreleaser extension.

The following properties may also be set on the jreleaser configuration instance:

Name Type Required Default Value Description

dryrun

boolean

no

false

Skips remote operations.

gitRootSearch

boolean

no

false

Searches for the git root

configFile

RegularFile

no

External configuration file

Defaults

The following values will be taken directly from the Gradle project and added to JReleaser’s configuration when the matching JReleaser element has not been explicitly configured:

Build file JReleaser

project.name

project.name

project.version

project.version

project.description

project.description

project.group

project.java.groupId

project.name

project.java.artifactId

The value of project.java.multiProject will be set to true if the root project has children.

The value of project.java.version will be determined following these expressions in order:

  • ${project.targetCompatibility}

  • ${project.compilerRelease}

  • org.gradle.api.JavaVersion.current()

The following properties will be automatically mapped when the org.kordamp.gradle.project plugin is applied:

Kordamp JReleaser

config.info.description

project.description

config.info.links.website

project.links.homepage

config.info.authors

project.authors

config.info.tags

project.tags

config.info.licenses

project.license

config.info.inceptionYear

project.inceptionYear

Environment Variables

The following settings may also be specified via environment variables

Setting

Environment Variable

Default

JRELEASER_DEFAULT_GIT_REMOTE

origin

DSL Descriptors

The plugin ships with GDSL (IntelliJ) and DSLD (Eclipse) DSL descriptors that should provide code completion support for the jreleaser extension when using the Groovy DSL in Gradle scripts. These files should be picked up automatically but if that were not to be the case then you may download the files and register them with your IDE:

Tasks

The following tasks are provided:

jreleaserConfig

Path
     :jreleaserConfig

Type
     JReleaserConfigTask (org.jreleaser.gradle.plugin.tasks.JReleaserConfigTask)

Options
     --announce                 Display announce configuration (OPTIONAL).

     --assembly                 Display assembly configuration (OPTIONAL).

     --changelog                Display changelog configuration (OPTIONAL).

     --dry-run                  Skip remote operations (OPTIONAL).

     --download                 Display download configuration (OPTIONAL).

     --full                     Display full configuration (OPTIONAL).

     --git-root-search          Searches for the Git root (OPTIONAL).

     --select-current-platform  Activates paths matching the current platform (OPTIONAL).

     --select-platform          Activates paths matching the given platform (OPTIONAL).

Description
     Outputs current JReleaser configuration

Group
     JReleaser

jreleaserTemplate

Path
     :jreleaserTemplate

Type
     JReleaserTemplateTask (org.jreleaser.gradle.plugin.tasks.JReleaserTemplateTask)

Options
     --announcer-name        The name of the announcer (OPTIONAL).

     --assembler-name        The name of the assembler (OPTIONAL).

     --assembler-type        The type of the assembler (OPTIONAL).

     --distribution-name     The name of the distribution (OPTIONAL).

     --distribution-type     The type of the distribution (OPTIONAL).
                             Available values are:
                                  JAVA_BINARY
                                  JLINK
                                  NATIVE_IMAGE
                                  NATIVE_PACKAGE
                                  SINGLE_JAR

     --overwrite             Overwrite existing files (OPTIONAL).

     --packager-name         The name of the packager (OPTIONAL).

     --snapshot              Use snapshot template (OPTIONAL).

Description
     Generates templates for a specific tool/announcer

Group
     JReleaser

jreleaserDownload

Path
     :jreleaserDownload

Type
     JReleaserDownloadTask (org.jreleaser.gradle.plugin.tasks.JReleaserDownloadTask)

Options
     --downloader-name           Include an downloader by name (OPTIONAL).

     --downloader                Include an downloader by type (OPTIONAL).

     --dry-run                   Skip remote operations (OPTIONAL).

     --exclude-downloader-name   Exclude an downloader by name (OPTIONAL).

     --exclude-downloader        Exclude an downloader by type (OPTIONAL).

     --git-root-search           Searches for the Git root (OPTIONAL).

Description
     Downloads assets

Group
     JReleaser

jreleaserAssemble

Path
     :jreleaserAssemble

Type
     JReleaserAssembleTask (org.jreleaser.gradle.plugin.tasks.JReleaserAssembleTask)

Options
     --assembler                The name of the assembler (OPTIONAL).

     --distribution             The name of the distribution (OPTIONAL).

     --dry-run                  Skip remote operations (OPTIONAL).

     --exclude-assembler        Exclude an assembler (OPTIONAL).

     --exclude-distribution     Exclude a distribution (OPTIONAL).

     --git-root-search          Searches for the Git root (OPTIONAL).

     --select-current-platform  Activates paths matching the current platform (OPTIONAL).

     --select-platform          Activates paths matching the given platform (OPTIONAL).

Description
     Assemble all distributions

Group
     JReleaser

jreleaserChangelog

Path
     :jreleaserChangelog

Type
     JReleaserChangelogTask (org.jreleaser.gradle.plugin.tasks.JReleaserChangelogTask)

Description
     Calculate changelogs

Group
     JReleaser

jreleaserChecksum

Path
     :jreleaserChecksum

Type
     JReleaserChecksumTask (org.jreleaser.gradle.plugin.tasks.JReleaserChecksumTask)

Options
     --distribution             The name of the distribution (OPTIONAL).

     --dry-run                  Skip remote operations (OPTIONAL).

     --exclude-distribution     Exclude a distribution (OPTIONAL).

     --git-root-search          Searches for the Git root (OPTIONAL).

     --select-current-platform  Activates paths matching the current platform (OPTIONAL).

     --select-platform          Activates paths matching the given platform (OPTIONAL).

Description
     Calculate checksums

Group
     JReleaser

jreleaserSign

Path
     :jreleaserSign

Type
     JReleaserSignTask (org.jreleaser.gradle.plugin.tasks.JReleaserSignTask)

Options
     --distribution             The name of the distribution (OPTIONAL).

     --dry-run                  Skip remote operations (OPTIONAL).

     --exclude-distribution     Exclude a distribution (OPTIONAL).

     --git-root-search          Searches for the Git root (OPTIONAL).

     --select-current-platform  Activates paths matching the current platform (OPTIONAL).

     --select-platform          Activates paths matching the given platform (OPTIONAL).

Description
     Signs a release

Group
     JReleaser

jreleaserDeploy

Path
     :jreleaserDeploy

Type
     JReleaserDeployTask (org.jreleaser.gradle.plugin.tasks.JReleaserDeployTask)

Options
     --deployer                  Include a deployer by type (OPTIONAL).

     --deployer-name             Include a deployer by name (OPTIONAL).

     --dry-run                   Skip remote operations (OPTIONAL).

     --exclude-deployer          Exclude a deployer by type (OPTIONAL).

     --exclude-deployer-name     Exclude a deployer by name (OPTIONAL).

     --git-root-search           Searches for the Git root (OPTIONAL).

     --select-current-platform   Activates paths matching the current platform (OPTIONAL).

     --select-platform           Activates paths matching the given platform (OPTIONAL).

Description
     Deploys all staged artifacts

Group
     JReleaser

jreleaserUpload

Path
     :jreleaserUpload

Type
     JReleaserUploadTask (org.jreleaser.gradle.plugin.tasks.JReleaserUploadTask)

Options
     --distribution              The name of the distribution (OPTIONAL).

     --dry-run                   Skip remote operations (OPTIONAL).

     --exclude-distribution      Exclude a distribution (OPTIONAL).

     --exclude-uploader-name     Exclude an uploader by name (OPTIONAL).

     --exclude-uploader          Exclude an uploader by type (OPTIONAL).

     --git-root-search           Searches for the Git root (OPTIONAL).

     --select-current-platform   Activates paths matching the current platform (OPTIONAL).

     --select-platform           Activates paths matching the given platform (OPTIONAL).

     --uploader-name             Include an uploader by name (OPTIONAL).

     --uploader                  Include an uploader by type (OPTIONAL).

Description
     Uploads all artifacts

Group
     JReleaser

jreleaserRelease

Path
     :jreleaserRelease

Type
     JReleaserReleaseTask (org.jreleaser.gradle.plugin.tasks.JReleaserReleaserTask)

Options
     --deployer                  Include a deployer by type (OPTIONAL).

     --deployer-name             Include a deployer by name (OPTIONAL).

     --distribution             The name of the distribution (OPTIONAL).

     --dry-run                  Skip remote operations (OPTIONAL).

     --exclude-deployer          Exclude a deployer by type (OPTIONAL).

     --exclude-deployer-name     Exclude a deployer by name (OPTIONAL).

     --exclude-distribution     Exclude a distribution (OPTIONAL).

     --exclude-uploader         Exclude an uploader by type (OPTIONAL).

     --exclude-uploader-name    Exclude an uploader by name (OPTIONAL).

     --git-root-search          Searches for the Git root (OPTIONAL).

     --select-current-platform  Activates paths matching the current platform (OPTIONAL).

     --select-platform          Activates paths matching the given platform (OPTIONAL).

     --uploader                 Include an uploader by type (OPTIONAL).

     --uploader-name            Include an uploader by name (OPTIONAL).
Description
     Uploads all artifacts

Group
     JReleaser

jreleaserPrepare

Path
     :jreleaserPrepare

Type
     JReleaserPrepareTask (org.jreleaser.gradle.plugin.tasks.JReleaserPrepareTask)

Options
     --distribution             Include a distribution (OPTIONAL).

     --dry-run                  Skip remote operations (OPTIONAL).

     --exclude-distribution     Exclude a distribution (OPTIONAL).

     --exclude-packager         Exclude a packager (OPTIONAL).

     --git-root-search          Searches for the Git root (OPTIONAL).

     --packager                 Include a packager (OPTIONAL).

     --select-current-platform  Activates paths matching the current platform (OPTIONAL).

     --select-platform          Activates paths matching the given platform (OPTIONAL).

Description
     Prepares all distributions

Group
     JReleaser

jreleaserPackage

Path
     :jreleaserPackage

Type
     JReleaserPackageTask (org.jreleaser.gradle.plugin.tasks.JReleaserPackageTask)

Options
     --distribution             Include a distribution (OPTIONAL).

     --dry-run                  Skip remote operations (OPTIONAL).

     --exclude-distribution     Exclude a distribution (OPTIONAL).

     --exclude-packager         Exclude a packager (OPTIONAL).

     --git-root-search          Searches for the Git root (OPTIONAL).

     --packager                 Include a packager (OPTIONAL).

     --select-current-platform  Activates paths matching the current platform (OPTIONAL).

     --select-platform          Activates paths matching the given platform (OPTIONAL).

Description
     Packages all distributions

Group
     JReleaser

jreleaserPublish

Path
     :jreleaserPublish

Type
     JReleaserPublishTask (org.jreleaser.gradle.plugin.tasks.JReleaserPublishTask)

Options
     --distribution             Include a distribution (OPTIONAL).

     --dry-run                  Skip remote operations (OPTIONAL).

     --exclude-distribution     Exclude a distribution (OPTIONAL).

     --exclude-packager         Exclude a packager (OPTIONAL).

     --git-root-search          Searches for the Git root (OPTIONAL).

     --packager                 Include a packager (OPTIONAL).

     --select-current-platform  Activates paths matching the current platform (OPTIONAL).

     --select-platform          Activates paths matching the given platform (OPTIONAL).

Description
     Publishes all distributions

Group
     JReleaser

jreleaserAnnounce

Path
     :jreleaserAnnounce

Type
     JReleaserAnnounceTask (org.jreleaser.gradle.plugin.tasks.JReleaserAnnounceTask)

Options
     --announcer                Include an announcer (OPTIONAL).

     --dry-run                  Skip remote operations (OPTIONAL).

     --exclude-announcer        Exclude an announcer (OPTIONAL).

     --git-root-search          Searches for the Git root (OPTIONAL).

     --select-current-platform  Activates paths matching the current platform (OPTIONAL).

     --select-platform          Activates paths matching the given platform (OPTIONAL).

Description
     Announces a release

Group
     JReleaser

jreleaserFullRelease

Path
     :jreleaserFullRelease

Type
     JReleaserFullReleaseTask (org.jreleaser.gradle.plugin.tasks.JReleaserFullReleaseTask)

Options
     --announcer                Include an announcer (OPTIONAL).

     --deployer                  Include a deployer by type (OPTIONAL).

     --deployer-name             Include a deployer by name (OPTIONAL).

     --distribution             Include a distribution (OPTIONAL).

     --dry-run                  Skip remote operations (OPTIONAL).

     --exclude-announcer        Exclude an announcer (OPTIONAL).

     --exclude-deployer          Exclude a deployer by type (OPTIONAL).

     --exclude-deployer-name     Exclude a deployer by name (OPTIONAL).

     --exclude-distribution     Exclude a distribution (OPTIONAL).

     --exclude-packager         Exclude a packager (OPTIONAL).

     --exclude-uploader         Exclude an uploader by type (OPTIONAL).

     --exclude-uploader-name    Exclude an uploader by name (OPTIONAL).

     --git-root-search          Searches for the Git root (OPTIONAL).

     --packager                 Include a packager (OPTIONAL).

     --select-current-platform  Activates paths matching the current platform (OPTIONAL).

     --select-platform          Activates paths matching the given platform (OPTIONAL).

     --uploader                 Include an uploader by type (OPTIONAL).

     --uploader-name            Include an uploader by name (OPTIONAL).

Description
     Invokes release, publish, and announce

Group
     JReleaser

jreleaserAutoConfigRelease

Path
     :jreleaserAutoConfigRelease

Type
     JReleaseAutoConfigReleaseTask (org.jreleaser.gradle.plugin.tasks.JReleaseAutoConfigReleaseTask)

Options
     --armored                         Generate ascii armored signatures (OPTIONAL).

     --author                          The project authors (OPTIONAL).

     --branch                          The release branch (OPTIONAL).

     --changeLog                       Path to changelog file (OPTIONAL).

     --changelog-formatted             Format generated changelog (OPTIONAL).

     --commit-author-email             Commit author email (OPTIONAL).

     --commit-author-name              Commit author name (OPTIONAL).

     --draft                           If the release is a draft (OPTIONAL).

     --dry-run                         Skip remote operations (OPTIONAL).

     --file                            Input file(s) to be uploaded (OPTIONAL).

     --git-root-search                 Searches for the Git root (OPTIONAL).

     --glob                            Input file(s) to be uploaded (as globs) (OPTIONAL).

     --milestone-name                  The milestone name (OPTIONAL).

     --overwrite                       Overwrite an existing release (OPTIONAL).

     --prerelease                      If the release is a prerelease (OPTIONAL).

     --prerelease-pattern              The prerelease pattern (OPTIONAL).

     --project-copyright               The project copytight (OPTIONAL).

     --project-description             The project description (OPTIONAL).

     --project-inception-year          The project inception year (OPTIONAL).

     --project-name                    The project name (OPTIONAL).

     --project-snapshot-label          The project snapshot label (OPTIONAL).

     --project-snapshot-pattern        The project snapshot pattern (OPTIONAL).

     --project-snapshot-full-changelog Calculate full changelog since last non-snapshot release (OPTIONAL).

     --project-stereotype              The project stereotype (OPTIONAL).

     --project-version                 The project version (OPTIONAL).

     --project-version-pattern         The project version pattern (OPTIONAL).

     --release-name                    The release name (OPTIONAL).

     --signing                         Sign files (OPTIONAL).

     --select-current-platform         Activates paths matching the current platform (OPTIONAL).

     --select-platform                 Activates paths matching the given platform (OPTIONAL).

     --skip-release                    Skip creating a release (OPTIONAL).

     --skip-tag                        Skip tagging the release (OPTIONAL).

     --tag-name                        The release tga (OPTIONAL).

     --update                          Update an existing release (OPTIONAL).

     --update-section                  Release section to be updated (OPTIONAL).

     --username                        Git username (OPTIONAL).

Description
     Creates or updates a release with auto-config enabled

Group
     JReleaser