Gradle Artifact Publishing Concepts: Difference between revisions
(One intermediate revision by the same user not shown) | |||
Line 1: | Line 1: | ||
=External= | =External= | ||
* https://docs.gradle.org/current/userguide/publishing_overview.html | |||
* https://docs.gradle.org/current/userguide/artifact_management.html | * https://docs.gradle.org/current/userguide/artifact_management.html | ||
* https://docs.gradle.org/current/userguide/publishing_maven.html | * https://docs.gradle.org/current/userguide/publishing_maven.html | ||
Line 19: | Line 20: | ||
=<span id='Artifact'>Publication Artifact= | =<span id='Artifact'>Publication Artifact= | ||
When the artifacts produced by Gradle need to be published in an external repository, they are referred to as '''publication artifacts'''. | When the [[Gradle_Concepts#Artifact|artifacts]] produced by Gradle need to be published in an external repository, they are referred to as '''publication artifacts'''. | ||
==Extension== | ==Extension== |
Latest revision as of 01:05, 24 February 2019
External
- https://docs.gradle.org/current/userguide/publishing_overview.html
- https://docs.gradle.org/current/userguide/artifact_management.html
- https://docs.gradle.org/current/userguide/publishing_maven.html
- https://docs.gradle.org/current/userguide/maven_plugin.html#uploading_to_maven_repositories
Internal
Overview
Publishing plugins, such as Maven and Maven Publish, define publishing tasks, which then can be configured in build scripts and used to publish artifacts.
Is the following relevant to Maven Publish, or only to Maven? The Gradle dependency configurations are also used to specify publishing artifacts. There are two configurations introduced by the Java plugin that are relevant to artifact generation and publishing: archives and runtime. Their relationship with artifact publishing is explained in the Java plugin page. Any custom archive created as part of the build are not automatically assigned to any configuration. If such as assignment is desired, it will have to be explicitly declared.
Publication Artifact
When the artifacts produced by Gradle need to be published in an external repository, they are referred to as publication artifacts.
Extension
Publishing plugin allow it to be configured.
Classifier
Publishing plugin allow it to be configured.
Publishing to a Maven Repository
There are two plugins that can be used to publish to a Maven repository: Maven and Maven Publish. Gradle 1.3 and newer makes Maven Publish available. For pre-1.3 Gradle, only Maven can be used to publish.