= JReleaser Gradle Plugin

Executes a JReleaser workflow as a Gradle plugin.

== Install

[source,groovy]
[subs="attributes"]
.build.gradle
----
plugins {
    id 'org.jreleaser' version '{jreleaser-version}'
}
----

== Configuration

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

=== 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:

[%header, cols="<1,<1", width="100%"]
|===
| POM                 | 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 `link:https://kordamp.org/kordamp-gradle-plugins/[org.kordamp.gradle.project]`
plugin is applied:

[%header, cols="<1,<1", width="100%"]
|===
| Kordamp                   | JReleaser
| config.info.description   | project.description
| config.info.links.website | project.website
| config.info.authors       | project.authors
| config.info.tags          | project.tags
| config.info.licenses      | project.license
| config.info.inceptionYear | project.extraProperties.inceptionYear
|===

== Tasks

The following tasks are provided:

=== jreleaserConfig

[source]
----
Path
     :jreleaserConfig

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

Options
     --assembly     Display assembly configuration (OPTIONAL).

     --full         Display full configuration (OPTIONAL).

Description
     Outputs current JReleaser configuration

Group
     JReleaser
----

=== jreleaserTemplate

[source]
----
Path
     :jreleaserTemplate

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

Options
     --announcer-name        The name of the announcer (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
                                  SINGLE_JAR

     --overwrite             Overwrite existing files (OPTIONAL).

     --snapshot              Use snapshot template (OPTIONAL).

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

Description
     Generates templates for a specific tool/announcer

Group
     JReleaser
----

=== jreleaserAssemble

[source]
----
Path
     :jreleaserAssemble

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

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

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

Description
     Assemble all distributions

Group
     JReleaser
----

=== jreleaserChangelog

[source]
----
Path
     :jreleaserChangelog

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

Description
     Calculate changelogs

Group
     JReleaser
----

=== jreleaserChecksum

[source]
----
Path
     :jreleaserChecksum

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

Description
     Calculate checksums

Group
     JReleaser
----

=== jreleaserSign

[source]
----
Path
     :jreleaserSign

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

Description
     Signs a release

Group
     JReleaser
----

=== jreleaserUpload

[source]
----
Path
     :jreleaserUpload

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

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

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

Description
     Uploads all artifacts

Group
     JReleaser
----

=== jreleaserRelease

[source]
----
Path
     :jreleaserUpload

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

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

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

Description
     Uploads all artifacts

Group
     JReleaser
----

=== jreleaserPrepare

[source]
----
Path
     :jreleaserPrepare

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

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

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

Description
     Prepares all distributions

Group
     JReleaser
----

=== jreleaserPackage

[source]
----
Path
     :jreleaserPackage

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

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

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

Description
     Packages all distributions

Group
     JReleaser
----

=== jreleaserPublish

[source]
----
Path
     :jreleaserPublish

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

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

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

Description
     Publishes all distributions

Group
     JReleaser
----

=== jreleaserAnnounce

[source]
----
Path
     :jreleaserAnnounce

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

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

Description
     Announces a release

Group
     JReleaser
----

=== jreleaserFullRelease

[source]
----
Path
     :jreleaserFullRelease

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

Description
     Invokes JReleaser on all distributions

Group
     JReleaser
----

=== jreleaserAutoConfigRelease

[source]
----
Path
     :jreleaserAutoConfigRelease

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

Options
     --armored                  Generate ascii armored signatures (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).

     --dryrun                   Skip remote operations.

     --file                     Input file(s) to be uploaded (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).

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

     --project-snapshot-pattern The project snapshot pattern (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).

     --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
----
